我使用的是安装在服务器上的CITOS 6.6,尝试使用节点GYP,但是当我使用命令节点GYP构建时,我得到了一个错误,我使用的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
您需要更新节点gyp:
sudo npm update -g node-gyp
我已经用devTool安装了更新的g++
然后就成功了!;)
相关问题 更多 >
编程相关推荐