NPM will not install

While often I do not use Nodejs or NPM recently I wanted to run a socketio test which required NPM I followed the steps to install socketio and noticed npm was not properly working having installed it before I decided to uninstall it (all my issues really began here) once uninstalled I tried to reinstall I had got node reinstalled (tested with node -v) however when I tried to install NPM it threw errors
Code to install:

sudo apt-get install npm

Returned:

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/nodejs/node]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-tweetn]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-color-]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-chalk/]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-yallis]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-lru-ca]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-which/]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-flush-]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-pumpif]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-cliui/]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-object]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-har-va]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-jsonpa]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-strip-]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-semver]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-form-d]
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/n/node-tar/no]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I have tried all kinds of solutions on the internet with no luck

sudo apt-get update
sudo apt-get upgrade
sudo npm install npm -g

Seemed to run with no errors but did not fix the issue

sudo apt-get update --fix-missing

fix missing result:

E: The repository 'http://mirrors.linode.com/ubuntu disco Release' no longer ha.
N: Updating from such a repository can't be done securely, and is therefore dis.
N: See apt-secure(8) manpage for repository creation and user configuration det.
E: The repository 'http://mirrors.linode.com/ubuntu disco-updates Release' no l.
N: Updating from such a repository can't be done securely, and is therefore dis.
N: See apt-secure(8) manpage for repository creation and user configuration det.
E: The repository 'http://mirrors.linode.com/ubuntu disco-backports Release' no.
N: Updating from such a repository can't be done securely, and is therefore dis.
N: See apt-secure(8) manpage for repository creation and user configuration det.
E: The repository 'http://security.ubuntu.com/ubuntu disco-security Release' no.
N: Updating from such a repository can't be done securely, and is therefore dis.
N: See apt-secure(8) manpage for repository creation and user configuration det.

Many NPM commands that did not work as it is not installed

Probably tried like 20 other things as well this has been going on for about 3 days now any help to get my NPM reinstalled and working would be greatly appreciated

6 Replies

Taking a look I'm seeing a reference to 'disco' in the errors. Are you using Ubuntu 19.04 Disco Dingo? If so, it reached EOL on Janurary 23, 2020. Because it's now EOL, there's no official repositories for our mirrors to pick up on. I'd recommend upgrading your Linode to Ubuntu 20.04. Check out this Community Questions post for suggestions on how to do so:

How do I upgrade my existing Ubuntu installation?

Thank you looks like I will have to upgrade as I am using 19.04

Ubuntu’s interim releases only have a 9-month shelf life. If you need longer term support, stick to LTS releases which are supported for 5 years:

  • 18.04
  • 20.04
  • 22.04
    etc.

Anything in between (18.10, 19.04, 19.10) are interim releases.

So I tried to upgrade today in order to do so I need to get upgrades and updates with

apt-get update && apt-get upgrade

that throws the same errors as before with the

sudo apt-get update --fix-missing

and so I am unable to upgrade my ubuntu version any help is greatly appreciated

Please see the below link to repoint your APT sources.list to the archived releases server, which should then allow you to use do-release-upgrade to get onto a supported release.

https://help.ubuntu.com/community/EOLUpgrades

I have tried editing the sources list as told however it seems to have the same errors I know this sounds pretty crazy just to do a upgrade but I may rebuild my linode as I have rebuilt it a few times and there is not much to it mainly our website maybe it will give me some time to figure out what I am doing with upgrading releases lol

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct