How to upgrade Node js version to 0.12.4 on Ubuntu

I want to upgrade the version of Node JS on Ubuntu.

I tried many commands, but its version is still older than ie v0.10.37.

I tried:

sudo npm install -gn sudo n install 0.12.4 sudo n use 0.12.4 

Also tried with nvm, but not one of them works for me. How to upgrade Node Js version to 0.12.4?

+5
source share
6 answers

Use npm to update node

First clear your cache and try

 sudo npm cache clean -f sudo npm install -gn sudo n 0.12.4 

Then create a symbolic link (this is only necessary sometimes, first try with these three commands. If this does not work, add this.)

It will be updated to version 0.12.4 .

+9
source

Simply install the n module:

sudo npm install -gn

and then just run:

sudo n 0.12.4

The trick is that it cannot be updated in the current terminal session. Thus, you can simply open another tab in your terminal or another terminal and check the nodejs version for:

node --version

For this, the output will be v0.12.4

+4
source

The official doc from the nodejs repository points to the following: https://nodesource.com/blog/nodejs-v012-iojs-and-the-nodesource-linux-repositories#installing-node-js-v0-12

Just follow him and you will have 0.12.4.

+1
source

Try running this in the terminal:

 nvm install 5.10.1 nvm use 5.10.1 

Version is subject to change.

Hooray!

+1
source

Run the following command to upgrade nodejs to 0.12.x

Check out the new script installation name for Node.js v0.12

curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -

Then install using:

sudo apt-get install -y nodejs

Just ignore the warning. Running both commands, it worked for me on Ubuntu 14.04

0
source

On Ubuntu 16.04

There is no special or special command to update the version of node. The correct way to install or upgrade node on ubuntu:

1) download the distribution from the official nodejs website , move the file to a known path

2) open a terminal and run:> sudo tar -C /usr/local --strip-components 1 -xzf "known path/name_of_the_distribution_file...gz

3) check if everything is in order: open a new terminal and run node --version . It should repeat the version you downloaded and installed / updated.

0
source

All Articles