在Debian 6上安装nodejs

时间:2013-09-03 04:22:56

标签: node.js amazon-ec2 debian

很多(旧的)帖子表明,如果有人想在Debian 6上安装node.js(在我的情况下,这是我正在试验的Amazon EC2 t1.micro实例),那么需要编译你自己的事实上,Debian软件包显着落后于node.js开发的狂热节奏。

node.js website列出v0.10.17作为当前稳定版本。当前nodejs package information很好地也列出了相同的(0.10.17~dfsg1-2),这听起来不错吧?毕竟不用做制作!

问题是这个请求:

sudo apt-get install nodejs

产生以下结果:

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

所以我的问题是这样的:我看到一个包是PLANNED但尚未创建它的样子,或者是否有一些apt-get问题在这里我的安装只是没有看到nodejs包和因此无法安装吗?我不得不做一个制作? (顺便说一下,当我尝试的时候,我就爆炸了。)

1 个答案:

答案 0 :(得分:6)

我不知道您从源代码编译所采取的步骤。这是我使用的,它在多个服务器上运行良好:

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 

您应该收到回复。全部设定。