How to update nodejs on Ubuntu (Debian)
Thanks StackOverflow!
First method: Through NPM
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
node -v
Second method: Through NVM
curl https://raw.github.com/creationix/nvm/master/install.sh | sh
source ~/.profile
nvm install 0.10.26
nvm use v0.10.26
which node
node -v
- install node globally (ie, into /usr/local)
n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local