python - centos 上的 node-gyp 构建错误

标签 python c++ linux node.js

我正在使用服务器上安装的Centos 6.6并尝试使用node-gyp,但是当我使用命令node-gyp build时出现错误,我使用的python版本是2.7.8和GCC C++编译器。下面提到了我收到的错误。

 # node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@1.0.2
gyp info using node@0.10.35 | linux | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/root/build'
make: *** No rule to make target `Release/obj.target/binding/src/binding.o', 
needed by `Release/obj.target/binding.node'.  Stop.
make: Leaving directory `/root/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/node-
gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit 
(child_process.js:820:12)
gyp ERR! System Linux 2.6.32-504.3.3.el6.x86_64
gyp ERR! command "node" "/usr/local/bin/node-gyp" "build"
gyp ERR! cwd /root
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok

最佳答案

您需要更新node-gyp:sudo npm update -g node-gyp

关于python - centos 上的 node-gyp 构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28426698/

相关文章:

python - uwsgi 容器中的 Google StackDriver 日志级别始终处于错误级别

python - 为什么我的就地反转字符列表的解决方案不起作用?

python - 尝试安装 pycuda,出现 zip 错误?

c++ - 某些代码未从代码覆盖率中删除

c++ - 动态分配的使用

c - 如何在服务器和客户端之间创建多个tcp连接

python - 从 MySQL 查询设置 CheckListBox

c++ - 在 Mac 上编写 C++ 的最佳环境是什么?

linux - 如何仅在出现错误时中止函数,而不中止脚本?

python - 将 Linux 上的 Python 脚本打包为 Windows 可执行文件