my source: http://www.codediesel.com/linux/installing-node-js-on-ubuntu-10-04/ (i guess though its an old ubuntu, this should still be applicable)
sudo apt-get install libv8-3.7.12.22 libv8-dev libv8-dbg libssl-dev curl
Go to nodejs.org - then hit download - which as of 10/2/2012 the link is http://nodejs.org/dist/v0.8.9/node-v0.8.9.tar.gz
or go hit (http://nodejs.org/dist/v0.8.9/node-v0.8.9.tar.gz)
tar zxvf node-v0.8.9.tar.gz
cd node-v0.8.9
./configure && make && make install
You may try checkinstall if you have installed it. I tried and it didn't work well.
Sometimes /usr/local/ is not owned by the user - so you have to chmod 777 it or chown it to your user. or chgroup to admin. After changing its permissions to 777 (sudo chmod -R /usr/local/) make install proceeded accordingly. using check install there were problems writing the log file up.
sudo curl (http://npmjs.org/install.sh) | sudo sh
I encountered a problem with the curl command about something regarding newline characters. So I used wget instead
*sudo npm install socket.io*