【问题标题】:Installing nodejs on Debian 6在 Debian 6 上安装 nodejs
【发布时间】:2013-09-03 04:22:56
【问题描述】:

很多(旧的?)帖子表明,如果想在 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

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

【问题讨论】:

  • 查看here给出的说明

标签: node.js amazon-ec2 debian


【解决方案1】:

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

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 

您应该会收到回复。一切就绪。

【讨论】:

  • 感谢您的指导;我会试一试,因为我没有遵循这些(我遵循了这个:sekati.com/etc/install-nodejs-on-debian-squeeze)。但是你知道为什么packages.debian.org/sid/nodejs 显示的是 0.10.17 的包吗?
  • 我通过查看 nodejs.org 知道 v0.10.17 是他们最新的版本。我听说普通存储库很难跟上最新版本的节点,因为它发展得如此之快。这就是为什么我选择从源代码编译我的项目。祝您好运!
  • 您的指示非常顺利。我从 sekati.com 分享的上一个链接包含从 git 克隆的说明,我想知道这一步是否出了问题。在制作过程中滚动过去的错误消息使用了“死得很惨”。
  • 使用上述说明为其他人添加的一件事是不要忘记您还需要 python 来运行 make for node。使用 sudo apt-get install python
  • 刚刚在 Jessie 上使用了这些说明。谢谢。
猜你喜欢
  • 2013-06-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-08-25
  • 2016-09-19
相关资源
最近更新 更多