安装heapdump报错 求解答。
发布于 7 年前 作者 yinlubin2014 7189 次浏览 来自 问答

大神帮忙看下,为什么装不上呢。 gcc 的版本是 4.8.5

root/.node-gyp/6.10.3/include/node/v8.h: In member function ‘v8::Local<T> v8::MaybeLocal<T>::ToLocalChecked()’:
/root/.node-gyp/6.10.3/include/node/v8.h:7538: error: ‘nullptr’ was not declared in this scope
../src/heapdump.cc: At global scope:
../src/heapdump.cc:52: error: ‘v8::Handle’ has not been declared
make: *** [Release/obj.target/addon/src/heapdump.o] Error 1
make: Leaving directory `/tol/app/video/node_modules/heapdump/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/tol/app/node-v6/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 2.6.32-279.el6.x86_64
gyp ERR! command "/tol/app/node-v6/bin/node" "/tol/app/node-v6/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tol/app/video-count-server/node_modules/heapdump
gyp ERR! node -v v6.10.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 2.6.32-279.el6.x86_64
npm ERR! argv "/tol/app/node-v6/bin/node" "/tol/app/node-v6/bin/npm" "install" "heapdump"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! heapdump@0.3.9 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the heapdump@0.3.9 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the heapdump package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs heapdump
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls heapdump
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /tol/app/video/npm-debug.log
2 回复

可以用 v8-profiler,因为6.10是48,有官方编译好的包,所以 npm install v8-profiler 就不用再次 node-gyp rebuild 了,肯定能安装成功

来自酷炫的 CNodeMD

回到顶部