5

许多(旧的?)帖子表明,如果想在 Debian 6 上安装 node.js(在我的情况下,这是我正在试验的 Amazon EC2 t1.micro 实例),那么考虑到以下事实,需要自己编译Debian 软件包明显落后于 node.js 开发的疯狂步伐。

node.js 网站将v0.10.17 列为当前稳定版本。当前的nodejs 包信息也很好地列出了相同的 (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

所以我的问题是这样的:我是否看到了一个包已计划但尚未创建时的样子,或者这里可能存在一些 apt-get 问题,我的安装只是看不到 nodejs 包,因此无法安装它?我是否坚持必须做一个制作?(顺便说一句,当我尝试它时,我爆炸了)。

4

1 回答 1

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

去测试:

node

0.1 + 0.2 

您应该会收到回复。可以了,好了。

于 2013-09-03T17:09:10.923 回答