我正在使用服务器上安装的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/