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! # Lucky 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.
—
43 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.
-
Jd Daniel
Install instructions work great on Ubuntu 11.10 as well.
Cheers. -
41 North Studios- Creating a Ruby/Rails development environment in OS X using a Parallels virtual machine
[...] followed the excellent directions at sekati.com/etc/install-nodejs-on-debian-squeeze to install Node.js. Basically, we are going to use git to clone the Node.js project from github.com [...]
-
javascript en console et comme serveur !!! | linuxidable
[...] article original http://sekati.com/etc/install-nodejs-on-debian-squeeze [...]
-
Jamie
Great how-to, thanks! I’m running the make test now. Fingers crossed :-)
-
於 Debian Linux (wheezy) 安裝 Node.js | Tsung's Blog
[...] Install Node.js on Debian Squeeze [...]
-
Kevin Campbell
You missed a sudo after && in
sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-devNot a biggie, but might be worth changing so the recipe is fool proof for beginners.
-
Install Stats.d / Graphite on a debian server in order to monitor a Symfony2 application (1/2) | ELAO | Le blog technique
[...] If you want the full detail, check out the source. [...]
-
Mathman87
If you’re having trouble compiling on arm, a site to checkout is http://www.yoovant.com/how-install-node-js-0-8-arm-based-sbc-fox-board-g20/. It helped me a lot.
-
bennidi
Nice work. Got it running without any problems. Thanks man.
-
Mark
In case someone finds this useful, I’ve created a small project to help you build your own node.js Debian packages:
https://github.com/mark-webster/node-debian -
bstephens
Wow! Worked perfectly. Thanks for posting this!
-
Rebnev
Hello! I’m trying to install nodejs.
And after make I take this errors.
I’m newbie in linux, but I guess error in openssl..how to fix it? thx!make[1]: execvp: printf: Argument list too long
make[1]: *** [/root/node/out/Release/obj.target/deps/openssl/libopenssl.a] Error 127
make[1]: Leaving directory `/root/node/out’
make: *** [node] Error 2 -
jason
Sounds like you need to install openssl:
sudo apt-get update && sudo apt-get install openssl
-
lonyi
yes,I love you !
爱死你了,终于找到一篇正儿八经可以用的教程了! -
Julian Romera Juarez
Wow, great, thanks! worked like a charm!
-
juan
hi … i have a problem when a try to install node.js
i look this
git clone https://github.com/joyent/node.git
cloning…
username node :
password:
and i dont knowsorry for my english
-
Krisu
Debian Squeeze. Node installed. Works fine. Thanks bye.
-
Andrii
I get this error when doing “make”:
make[1]: execvp: printf: Argument list too long
make[1]: *** [/root/nodetest/node/out/Release/obj.target/deps/openssl/libopenssl.a] Error 127
make[1]: Leaving directory `/root/nodetest/node/out’
make: *** [node] Error 2Don’t know what’s happening here.
-
Andrii
But it still installed with “sudo make install” and both node and npm seem to work fine. I wonder if I’ll find any problems with it later.
-
Souley
Thanks so much works like a charm!
-
William
September 19th, 2013 @ 9:38 am
The best explanation about this! thanks a lot
-
Aaron
Hey, It bloody worked on Deb7—Wheeeezy!
-
can't install libxml using nodejs on debian squeeze | Technology & Programming
[...] I’m running debian squeeze I did aptitude install libxml2-dev And I followed this howto to install node.js on my server https://sekati.com/etc/install-nodejs-on-debian-squeeze [...]
-
Installing Web Development Environment on Debian 7.2.0 | blog.chrisrussell.net
[...] I’m following the instructions here: http://sekati.com/etc/install-nodejs-on-debian-squeeze [...]
-
Installing node.js on debian 7 64 Bit | Webhaggler
[...] http://sekati.com/etc/install-nodejs-on-debian-squeeze [...]
-
Description and modeling of FlapMMO score data | ahstat webpage
[…] How to install node.js on Debian. […]
-
Tsumiki
Thank’s a lot! all work perfectly. Nice work
-
lamoon
Thank you, it’s work for me on debian 6
-
Esolitos
Thanks, i used the branch
v0.11.0-release
and it worked without any issue. -
Install Node.js on Debian | Monica Lent
[…] node modules so much as it was with my node install itself. I had installed from source following this guide, but it wasn’t quit enough to get my node install right on Debian […]
-
debian-install-node-npm
I must install python for it runs…
$ sudo aptitude install python -
Thomas Daly
Please could you explain what you mean by ‘isolate node’? Thank you!
-
Aniket Lawande
November 21st, 2014 @ 12:24 am
Thanks man !!
I had some nodejs transform scripts I needed to run on Deb 6 virtual machines. Worked like a charm !!! -
AOlszak
Thx man!
-
Stewart Dinnage
I’m having an issue at the make step.
project not configured (run ‘waf configure’ first)
any ideas? will be appreciated greatly. -
Ingmar
Tnx!
-
ololoshka
Great!