sudo apt-get install build-essential libssl-dev curl # The install script # Adapted from https://gist.github.com/579814 echo '# Added by install script for node.js and npm in 30s' >> ~/.bashrc echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc echo 'export NODE_PATH=$HOME/local/lib/node_modules' >> ~/.bashrc . ~/.bashrc mkdir -p ~/local mkdir -p ~/Downloads/node-latest-install cd ~/Downloads/node-latest-install curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 ./configure --prefix=~/local # if SSL support is not required, use --without-ssl make install node -v npm -v #In case of bash: /usr/local/bin/npm: No such file or directory hash -r npm -v