-1

I'm currently using Ubuntu 14.04 LTS, and I installed NodeJS 0.10. I am now trying to upgrade to version 5 of NodeJS.

I used the commands below to upgrade:

wget -qO- https://deb.nodesource.com/setup_4.x | sudo bash -
sudo apt-get install --yes nodejs
grooveplex
  • 2,486
  • 3
  • 25
  • 35
  • What was the output of those commands? How did you install NodeJS in the first place? – David Foerster Apr 19 '16 at 14:53
  • 1
    Possible duplicate of [How can I update my nodeJS to the latest version?](http://askubuntu.com/questions/426750/how-can-i-update-my-nodejs-to-the-latest-version) – David Foerster Apr 19 '16 at 14:53
  • I see that you still haven't accepted my answer. I it helped you, which I hope I did, please accept my answer by following the instructions here http://askubuntu.com/help/someone-answers – grooveplex Apr 22 '16 at 11:42

1 Answers1

0

Have you heard of n? With n you can interactively manage all your Node versions. You can have any amount of versions, for example 0.10.44 and 5.10.1 alongside each other.

How to do it:

  1. Install npm with sudo apt-get install npm.

  2. sudo npm install n -g.

  3. sudo n stable or any of the results of n ls to download and install that node version.

  4. Sit back and let it install.

  5. To verify that the installation was successful, type node -v.

To install another node version, simply run sudo n <version> (e.g 0.10). To switch, type sudo n and select your preferred version with the arrow up and down keys.

grooveplex
  • 2,486
  • 3
  • 25
  • 35