首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Contextify安装失败- "node: not found“

Contextify安装失败- "node: not found“
EN

Stack Overflow用户
提问于 2014-06-16 06:18:14
回答 1查看 15.3K关注 0票数 15

我无法在我的系统上安装Contextify。我正在运行Ubuntu14.04,node.js版本0.10.25,npm版本1.3.10,带有node-gyp版本0.10.10

我尝试过升级、重新启动、先安装依赖项,所有这些都试过了。任何东西都不能让它工作。

代码语言:javascript
复制
~$ sudo npm install -g contextify
npm http GET https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/nan

> contextify@0.1.8 install /usr/local/lib/node_modules/contextify
> node-gyp rebuild

/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-29-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/contextify
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! weird error 1
npm ERR! not ok code 0
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-06-17 17:00:29

我也有同样的问题。显然,Debian已经将命令node重命名为nodejs,这导致了这个问题。对我来说,安装nodejs-legacy解决了这个问题。

代码语言:javascript
复制
sudo apt-get update && sudo apt-get install nodejs-legacy

详情请参见https://github.com/voodootikigod/node-serialport/issues/301

票数 40
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24234595

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档