我正在尝试将mongodb安装为OS X 10.10.3上的npm依赖项,并且在编译bcrypt时遇到以下错误:
> bcrypt@0.8.5 install /Users/alex/Projects/frontend/node_modules/bcrypt
> node-gyp rebuild
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
SOLINK_MODULE(target) Release/bcrypt_lib.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/bcrypt_lib.node] 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:276:23)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "/usr/local/Cellar/node/5.10.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/alex/Projects/frontend/node_modules/bcrypt
gyp ERR! node -v v5.10.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
frontend@0.0.2 /Users/alex/Projects/frontend
├── bcryptjs@2.3.0 extraneous
└── kerberos@0.0.19 extraneous
UPD:我找到了相关问题解决方案https://github.com/nodejs/node/issues/2933