2

Using the software manager it automatically installs a very old version, v0.10.25. I am following this instructions from this link:

Node.js v5.x:

NOTE: If you are using Ubuntu Precise or Debian Wheezy, you might want to read about running Node.js >= 4.x on older distros.
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs

When I run run the first line it ends with:

Hit http://dl.google.com stable/main i386 Packages
Ign http://dl.google.com stable/main Translation-en_US
Ign http://dl.google.com stable/main Translation-en
Fetched 821 B in 19s (41 B/s)
W: Failed to fetch http://apt.puppetlabs.com/dists/lucid/main/source/Sources  404  Not Found

W: Failed to fetch http://apt.puppetlabs.com/dists/lucid/dependencies/source/Sources  404  Not Found

W: Failed to fetch https://deb.nodesource.com/trusty/dists/node_5.1.0/main/source/Sources  HttpError404

W: Failed to fetch https://deb.nodesource.com/trusty/dists/node_5.1.0/main/binary-amd64/Packages  HttpError404

W: Failed to fetch https://deb.nodesource.com/trusty/dists/node_5.1.0/main/binary-i386/Packages  HttpError404

W: Failed to fetch http://apt.puppetlabs.com/dists/lucid/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://apt.puppetlabs.com/dists/lucid/dependencies/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://apt.puppetlabs.com/dists/lucid/main/binary-i386/Packages  404  Not Found

W: Failed to fetch http://apt.puppetlabs.com/dists/lucid/dependencies/binary-i386/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
Error executing command, exiting

Then I end up with an older version of nodejs when I run the apt-get command. I am stumped...the manual installation did the same thing. I am not too savy at linux, but is there another way? Can I just download the correct version from their website and install it myself?

2 Answers 2

2

simply download nodejs latest from https://nodejs.org/en/. untar and ungzip it using

tar xzf file.tar.gz

you can save the folder where you keep your installables (like /opt or /usr/share). finally, link two most important executables "node" and "npm" stored at /bin/ or simply run it from there.

I found this most convenient. If you face any issue let me know.

0

If you want to use Node.js on the development environment, try nvm.

It is very easy to install and switch multiple versions of Node.js.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .