node.js - 在 Node 上安装 bcrypt 时出现 ELIFECYCLE 错误。 CXX 错误?

标签 node.js compiler-construction

安装 OS X Mountain Lion 和 XCode 后,我收到此错误:

Jonathans-MacBook-Air:fme jong$ npm install bcrypt
npm http GET https://registry.npmjs.org/bcrypt/0.7.0
npm http 304 https://registry.npmjs.org/bcrypt/0.7.0
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0

> bcrypt@0.7.0 install /Users/jong/Workspace/fme/node_modules/bcrypt
> node-gyp rebuild

  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
make: c++: No such file or directory
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.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:215:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:674:10)
gyp ERR! System Darwin 12.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jong/Workspace/fme/node_modules/bcrypt
gyp ERR! node -v v0.8.4
gyp ERR! node-gyp -v v0.6.1
gyp ERR! not ok 
npm ERR! bcrypt@0.7.0 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the bcrypt@0.7.0 install script.
npm ERR! This is most likely a problem with the bcrypt 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 bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 12.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "bcrypt"
npm ERR! cwd /Users/jong/Workspace/fme
npm ERR! node -v v0.8.4
npm ERR! npm -v 1.1.45
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/jong/Workspace/fme/npm-debug.log
npm ERR! not ok code 0

我有一种感觉,它不知道该使用哪个编译器。我该如何解决这个问题?

最佳答案

显然我只需要从 XCode 的下载面板安装命令行工具

关于node.js - 在 Node 上安装 bcrypt 时出现 ELIFECYCLE 错误。 CXX 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11696327/

相关文章:

c++ - 调整VS2010和VS6编译器和链接器开关以进行旧式构建

c - 尝试编译一个C程序

C++ 编译器输出

javascript - 在 Cassandra 和 Node.js 中使用用户定义的类型

node.js - 使用 nodejs、expressjs 和 knox 显示来自 amazon s3 的图像

node.js - node.js 版本号如何工作以及如何确保兼容性?

C++ 和 CRTP 模式实现和编译器困境

c++ - 在循环/if 括号后检测分号

javascript - Pouch 查询阻塞了 dom

javascript - Gulp watch 很奇怪: multiple run