用npm安装mmmagic时出错,node-gyp重build失败

我试图安装npm安装mmmagic,并继续得到这个错误。

我已经尝试了多个版本的mmmagic以及使用节点v0.10.40和节点v0.12.7,并重新安装node-gyp。

我清除了npmcaching,并多次销毁了node_module文件夹。

有任何想法吗?

make: *** [Release/magic.node] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/XXXX/.nvm/v0.10.40/lib/node_modules/npm/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 Darwin 15.0.0 gyp ERR! command "node" "/Users/XXXX/.nvm/v0.10.40/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/XXXX/Desktop/EdvisorIO/JJJJ/node_modules/mmmagic gyp ERR! node -v v0.10.40 gyp ERR! node-gyp -v v1.0.1 gyp ERR! not ok npm ERR! mmmagic@0.3.16 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the mmmagic@0.3.16 install script. npm ERR! This is most likely a problem with the mmmagic 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 their info via: npm ERR! npm owner ls mmmagic npm ERR! There is likely additional logging output above. npm ERR! System Darwin 15.0.0 npm ERR! command "/Users/XXXX/.nvm/v0.10.40/bin/node" "/Users/XXXX/.nvm/v0.10.40/bin/npm" "install" npm ERR! cwd /Users/XXXX/Desktop/EdvisorIO/JJJJ npm ERR! node -v v0.10.40 npm ERR! npm -v 1.4.28 npm ERR! code ELIFECYCLE npm ERR! not ok code 0