Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install latest nodejs version in ubuntu 14.04

Tags:

node.js

ubuntu

This is the way I installed nodejs in ubuntu 14.04 LTS:

sudo add-apt-repository ppa:chris-lea/node.js  sudo apt-get install nodejs 

When I checked the node version with this:

node -v 

I get this

v0.10.37 

But the latest version is 4.2.6 and 5.5.0. How can I get the latest or update version?

like image 626
Aamu Avatar asked Jan 24 '16 10:01

Aamu


People also ask

How do I install latest version of NodeJS Linux?

Install NodeJSRun sudo apt-get install -y nodejs . Once we're done, we can check that we have the latest version of Node installed. Simply type nodejs -v into your terminal and it should return v14. 4.0 .


1 Answers

sudo apt-get install curl 

For Node.js v4

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs 

For Node.js v5:

curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - sudo apt-get install -y nodejs 

Node.js v6:

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt-get install -y nodejs 

Node.js v7:

curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - sudo apt-get install -y nodejs 

Node.js 8:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs 

https://nodejs.org/en/download/package-manager/

like image 158
war1oc Avatar answered Sep 26 '22 22:09

war1oc