我正尝试在mac上通过npm安装hiredis,我得到了这个错误。我知道有一些可能的副本,但我已经尝试过其他解决方案,它们对我都不起作用。日志如下:
11 warnings and 17 errors generated.
make: *** [Release/obj.target/hiredis/src/hiredis.o] Error 1
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/npm/node_modules/node-gyp/lib/build.js:258: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 Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Aric/myApp/node_modules/hiredis
gyp ERR! node -v v6.10.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hiredis@0.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hiredis@0.3.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.发布于 2018-03-09 22:26:44
也许不是解决问题的正确方法,但我将hiredis从v0.3.0升级到了v0.5.0,它为我解决了这个问题。
https://stackoverflow.com/questions/49195018
复制相似问题