首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >centos上的node-gyp构建错误

centos上的node-gyp构建错误
EN

Stack Overflow用户
提问于 2015-02-10 15:59:49
回答 2查看 3.3K关注 0票数 1

我正在使用安装在服务器上的CentOS6.6,并试图使用node-gyp,但是当我使用node-gyp build命令时,我得到了一个错误,我使用的python版本是2.7.8和GCC C++编译器。我得到的错误如下所述。

代码语言:javascript
复制
 # 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
EN

回答 2

Stack Overflow用户

发布于 2015-05-26 22:19:19

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

票数 0
EN

Stack Overflow用户

发布于 2016-04-05 23:53:50

我已经安装了带有devTool的更新的g++

sudo yum安装--跳过--损坏的开发工具集-3

sudo yum install devtoolset-3-gcc-c++

sudo source /opt/rh/devtoolset-3\f25/enable

然后它就能工作了!;)

不安全sudo npm --日志级别详细--

-perm I ursa

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

https://stackoverflow.com/questions/28426698

复制
相关文章

相似问题

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