Installing Node.js on Ubuntu 10.04 LTS is pretty straight forward.
You will want a Node.js versioning manager. Node.js has a quick release
cycle, point releases happen quite frequently. A Node.js versioning
manager will help you keep all of your versions isolated from each
As it stands today, there are four Node.js version managers. They are:
NVM - NVM works like RVM. It
must be sourced in your ~./bashrc or ~./profile file. Some people
don't like this. It's my understanding that some find this to be a
bit of hackery.
Nave - Nave doesn't need to be
sourced or loaded up into your bash profile. But, when you use Nave
it executes commands into a
my understanding that if any process in a subshell modifies the
environment then these changes won't persist to the parent process.
It's not entirely clear these changes persist or not. But the
rhetoric from some regarding using subshells for version management
was enough to drive me away.
n - I love the simplicity of
'n'. It doesn't use subshells and it doesn't require that you modify
your bash profile. I would use 'n' if it installed NPM (Node.js
package manager) with each release, and it
nodeenv- I never seriously
considered this one as it requires Python to be installed. I haven't
read about anyone using this. But I wanted to list it so that you'd
be informed about its existence.
Use NVM. Seriously, it just works.
On your clean Ubuntu machine, make sure that Git is installed:
sudo apt-get install git-core
Then install NVM:
git clone git://github.com/creationix/nvm.git ~/.nvm
. ~/.nvm/nvm.sh # <------ be sure to add this line to the end of your ~./profile or ~./bashrc file
Now install all of the packages need to build Node.js: