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?
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 .
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With