Question

Installation for npm failing

Posted August 5, 2021 133 views
Ubuntu 20.04

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.

1 comment

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.

×
Submit an Answer
2 answers

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

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?