Install Node.JS on Debian Wheezy

Official Method

apt-get install python g++ make checkinstall
mkdir ~/node_js_src && cd $_
wget -N http://nodejs.org/dist/node-latest.tar.gz
tar xzvf node-latest.tar.gz && cd node-v*
./configure
checkinstall
dpkg -i node_*

Ubuntu Method

apt-get update
apt-get install -y python-software-properties python g++ make
add-apt-repository ppa:chris-lea/node.js

At this point the file with the new repository details must be edited. Open the file:/etc/apt/sources.list.d/chris-lea-node_js-wheezy.list with a text editor like vim and change the word “wheezy” to “lucid”.

apt-get update
apt-get install -y nodejs