Question

Installation for npm failing

I was able to successfully install nodejs with apt install nodejs

However, when I tried to run apt install npm per the guidelines at https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04, it returns this weird error:

N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
E: The repository 'http://mirrors.digitalocean.com/ubuntu focal InRelease' is no longer signed.
E: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/focal/InRelease  520  Origin Error [IP: 104.21.29.13 80]
E: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/focal-updates/InRelease  520  Origin Error [IP: 104.21.29.13 80]
E: The repository 'http://mirrors.digitalocean.com/ubuntu focal-updates InRelease' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/focal-backports/InRelease  520  Origin Error [IP: 104.21.29.13 80]
E: The repository 'http://mirrors.digitalocean.com/ubuntu focal-backports InRelease' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

In fact, I can’t even seem to run apt-get update and apt update without these errors showing up. Any ideas on what I can do to solve this? It’s really strange too because I could install nodejs with no issue.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @j93hahn,

Thank you for giving a heads up about resolving the issue.

The above reported is strange though. Did you make any other changes to your repositories or anything else on the droplet as a whole before experiencing the issue?

The issue has been resolved- I just waited 10 minutes and reinstalled it and it worked this time. Not sure why it didn’t work the first time haha