Saturday, October 31, 2015

Nodejs v5 on ubuntu 14.04

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs
node -v
v5.0.0

for the stable version:

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/nodejs
for the lastest:

sudo n latest

To undo:

sudo apt-get install --reinstall nodejs-legacy     # fix /usr/bin/node
sudo n rm 6.0.0     # replace number with version of Node that was installed
sudo npm uninstall -g n

No comments:

Post a Comment

How to revert comments Youtube layout?

#see video for details  https://www.youtube.com/watch?v=J0L_nYtNlqs #uBlock Origin  https://chrome.google.com/webstore/detail/ublock-o...