npm install memwatch 或者npm install heapdump的时候到node-gyp rebuild这一步会报错?
发布于 6 年前 作者 exdestroyer 3741 次浏览 来自 问答

gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Linux 2.6.32.43-tlinux_tvmguest-2.6-default gyp ERR! command “/usr/local/nodejs/bin/node” “/usr/local/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild" gyp ERR! cwd /usr/local/app/tars/tarsnode/data/medcloud.hospitalapp/bin/src/node_modules/memwatch-next gyp ERR! node -v v8.11.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! memwatch-next@0.3.0 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the memwatch-next@0.3.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

2 回复

在包含自 …/src/heapdiff.hh:11 的文件中, 从 …/src/heapdiff.cc:12: …/…/nan/nan.h:47:3: 错误:#error This version of node/NAN/v8 requires a C++11 compiler In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/…/…/…/…/include/c++/4.4.6/memory:83, from /home/mqq/.node-gyp/8.11.1/include/node/v8.h:21, from …/src/heapdiff.hh:8, from …/src/heapdiff.cc:12: /usr/lib/gcc/x86_64-redhat-linux/4.4.6/…/…/…/…/include/c++/4.4.6/bits/shared_ptr.h: In member function ‘virtual void* std::_Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp>::_M_get_deleter(const std::type_info&)’: /usr/lib/gcc/x86_64-redhat-linux/4.4.6/…/…/…/…/include/c++/4.4.6/bits/shared_ptr.h:146: 错误:在指定 -fno-rtti 的情况下不能使用 typeid /usr/lib/gcc/x86_64-redhat-linux/4.4.6/…/…/…/…/include/c++/4.4.6/bits/shared_ptr.h: In member function ‘virtual void* std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_get_deleter(const std::type_info&)’: /usr/lib/gcc/x86_64-redhat-linux/4.4.6/…/…/…/…/include/c++/4.4.6/bits/shared_ptr.h:204: 错误:在指定 -fno-rtti 的情况下不能使用 typeid /usr/lib/gcc/x86_64-redhat-linux/4.4.6/…/…/…/…/include/c++/4.4.6/bits/shared_ptr.h: In constructor ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, _Alloc, _Args&& …)’: /usr/lib/gcc/x86_64-redhat-linux/4.4.6/…/…/…/…/include/c++/4.4.6/bits/shared_ptr.h:861: 错误:在指定 -fno-rtti 的情况下不能使用 typeid /usr/lib/gcc/x86_64-redhat-linux/4.4.6/…/…/…/…/include/c++/4.4.6/bits/shared_ptr.h: In function ‘_Del* std::get_deleter(const std::__shared_ptr<_Tp2, _Lp>&)’: /usr/lib/gcc/x86_64-redhat-linux/4.4.6/…/…/…/…/include/c++/4.4.6/bits/shared_ptr.h:1005: 错误:在指定 -fno-rtti 的情况下不能使用 typeid In file included from …/src/heapdiff.hh:8,

这个包经常出错, 拿yarn安装试试?

回到顶部