-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
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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.