在Ubuntu上使用永久运行node.js服务器
我正在尝试使用'forever'node.js包在Ubuntu上运行node.js服务。 看起来应该是直截了当的。 但是,当我运行它时,我收到以下输出:
/usr/bin/env: node: No such file or directory
我认为这可能是因为Ubuntu软件包pipe理器命名node.js二进制nodejs
,而不是node
,这是更标准的。 有没有办法告诉永久包哪里找节点?
(我尝试将/usr/bin/node
链接到/usr/bin/nodejs
,但是这样会产生更多的错误,无论如何感觉就像是黑客)
你有没有尝试从源代码安装最新的节点 ?
git clone https://github.com/joyent/node.git cd node git checkout v0.8.22 #Try checking nodejs.org for what the stable version is ./configure make sudo make install
这个video并不完全清楚,但作者暗示,Debian版本库中的旧版本节点是node / nodejs命名问题的后面。
或者,您可以尝试使用此处所述的任何方法find/ usr / bin / nodejs符号链接的目标,并为此创build一个/ usr / bin / node符号链接。
祝你好运!