Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing nodejs on Debian 6

Lots of (old?) posts suggest that if one wants to install node.js on Debian 6 (in my case this is an Amazon EC2 t1.micro instance I am experimenting with), then one needs to compile your own given the fact that Debian packages significantly lag the frenzied pace of node.js development.

The node.js website lists v0.10.17 as the current stable release. The current nodejs package information nicely also lists the same (0.10.17~dfsg1-2) which sounds great right? Don't have to do a make after all!

Problem is that this request:

sudo apt-get install nodejs

Produces these results:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nodejs

So my question is this: am I seeing what it looks like when a package is PLANNED but not yet created, or is there maybe some apt-get issue going on here that my installation just doesn't see the nodejs package and therefore cannot install it? Am I stuck with having to do a make? (which btw, blew up on me when I tried it).

like image 937
Geek Stocks Avatar asked Sep 03 '13 04:09

Geek Stocks


1 Answers

I don't know the steps you took to compile from source. This is what I used and It worked well on multiple servers:

sudo apt-get install git build-essential

sudo apt-get install wget

wget (link to node.js source -> found on nodejs.org/download/)

tar xvf node(press tab to auto load the version you're on)

pushd node(again, use tab)

./configure

make 

sudo make install

TO TEST:

node

0.1 + 0.2 

You should receive a response. All set.

like image 198
brettwmc Avatar answered Nov 18 '22 19:11

brettwmc