I install nodejs using the following command on ubuntu
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs
Then it gives this message,
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 253 not upgraded.
W: Duplicate sources.list entry https://dl.bintray.com/sbt/debian/ Packages (/var/lib/apt/lists/dl.bintray.com_sbt_debian_Packages)
W: You may want to run apt-get update to correct these problems
When I do "sudo apt-get update", I get another error,
W: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/wily/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/wily/main/binary-i386/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/ole.wolf/rarcrack/ubuntu/dists/wily/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/ole.wolf/rarcrack/ubuntu/dists/wily/main/binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
Could you please let me know what how to correct that problem?
The errors occur because the four source links you (or some installer) added to your /etc/apt/sources.list are not found and return error 404.
If said entries are not in /etc/apt/sources.list, you can find them in some file /etc/apt/sources.list.d/*.list.
Delete the lines containing those urls in your /etc/apt/sources.list (or some file /etc/apt/sources.list.d/*.list) and install Node.js the official way:
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
Or if you want version 6:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
Note
Maybe your running into that problem because your Ubuntu version is not supported. I don't think they support 15.10, but only the LTS versions (14.04 & 16.04).
If you can, upgrade to 16.04 and try again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With