Install Node.js on Debian Squeeze
Recently I began a few Node.js projects which I roll micro VM guests to sandbox my experiments on. Unfortunately there are not maintained APT packages for Node or NPM on Squeeze. I decided since most information out there for Node/NPM installation on Debian/Ubuntu is a bit dated I’d document the quick/easy steps I used for my machine image:
Install dependency packages
sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-dev
Install Node.js & NPM
git clone https://github.com/joyent/node.git cd node # 'git tag' shows all available versions: select the latest stable. git checkout v0.6.8 # Configure seems not to find libssl by default so we give it an explicit pointer. # Optionally: you can isolate node by adding --prefix=/opt/node ./configure --openssl-libpath=/usr/lib/ssl make make test sudo make install node -v # it's alive! # Luck us: NPM is packaged with Node.js source so this is now installed too # curl http://npmjs.org/install.sh | sudo sh npm -v # it's alive!
That’s it; not rocket science but there are many install paths & given the rapid development cycle of Node it’s really best to be building from source at this point; hopefully this will save you a few cycles.
—
6 Responses
-
Joel
February 18th, 2012 @ 12:42 am
Thanks, this worked perfectly.
-
Yoyo
Worked fine for my debian, thanks ;]
-
Michael Watts
I couldn’t get my Debian to install build-essential package – for some reason. I had updated, and upgraded but instead managed to get it working by running apt-get make, apt-get gcc g++ (I think) and apt-get dpkg (+ dpkg-dev). Just in case anybody else has similar prob, this seems to have worked so far.
Many thanks for some great instructions.
-
jason
My pleasure! As for missing build-essential, this maybe due to some missing /etc/apt/sources.list perhaps; Debian’s a bit paranoid on the licensing of shipped packages – you can expand this by adding `contrib` & `non-free` to your sources.list, e.g:
deb http://ftp.us.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.us.debian.org/debian/ squeeze main contrib non-free -
dan
Thank you so much for this guide! At first, I followed some other guide, editing the /etc/apt/sources.list to include SID packages…
I ended up resetting by server…
Your guide worked out great and now I am happy with what I got!Thanks!
-
clayzermk1
Thanks, I’m up and running.

