Archive for the ‘nvm’ Category

[Fresh] Install node.js on Ubuntu server 11.10 (x64) via nvm step by step guide

January 8, 2012 2 comments
sudo apt-get -y install build-essential libssl-dev curl git
cd ~
git clone git://
. ~/nvm/
nvm install v0.6.7     # Current version as of this writing
nvm use v0.6.7
curl | sh      # Optional to install npm but recommended


  • It’s better to put the source command (. ~/nvm/ into your ~/.bashrc since the nvm command might get used quite often:
    if [ -f ~/nvm/ ]; then
        . ~/nvm/
  • If anything goes wrong during nvm install (for example, complaining certain library is not installed, I found the easiest way to re-start the install process is to install the missing library, followed by the removal of installation directory, ~/nvm/src/node-v0.6.7, for example
  • On my ubuntu vm running off an i3 laptop, it took 7 minutes to install node.js v0.6.7, YMMV
  • If you find yourself stuck inside node console, type command process.exit() to get out, solution found from here
Categories: node.js, nvm, ubuntu