centos 下 npm install , bcrypt 模块编译 出错
发布于 17天前 作者 jerrywu55 114 次浏览 来自 问答

[email protected] install /data/bbs.xxx/xxx/node_modules/bcrypt node-gyp rebuild child_process: customFds option is deprecated, use stdio instead. make: Entering directory /data/bbs.xxx/xxx/node_modules/bcrypt/build' 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 ../src/bcrypt_node.cc: In destructor ‘virtual<unnamed>::baton_base::~baton_base()’: ../src/bcrypt_node.cc:54: error: ‘class v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits<v8::Function> >’ has no member named ‘Dispose’ ../src/bcrypt_node.cc: At global scope: ../src/bcrypt_node.cc:128: error: variable or field ‘GenSaltAsync’ declared void ../src/bcrypt_node.cc:128: error: ‘uv_work_t’ was not declared in this scope ../src/bcrypt_node.cc:128: error: ‘req’ was not declared in this scope ../src/bcrypt_node.cc:137: error: variable or field ‘GenSaltAsyncAfter’ declared void ../src/bcrypt_node.cc:137: error: ‘uv_work_t’ was not declared in this scope ../src/bcrypt_node.cc:137: error: ‘req’ was not declared in this scope ../src/bcrypt_node.cc:429: error: expected ‘}’ at end of input make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1 make: Leaving directory/data/bbs.xxx/xxx/node_modules/bcrypt/build’ 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:267:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12) gyp ERR! System Linux 2.6.32-431.23.3.el6.x86_64 gyp ERR! command “node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild” gyp ERR! cwd /data/bbs.xxx/xxx/node_modules/bcrypt gyp ERR! node -v v0.12.0 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok npm ERR! Linux 2.6.32-431.23.3.el6.x86_64 npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! code ELIFECYCLE npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-gyp rebuild’. 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! Please include the following file with any support request: npm ERR! /data/bbs.xxx/xx/npm-debug.log


2 回复

gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)

找到问题了,原来是版本兼容性。

我的node.js版本为 0.12 , bcrypt 版本要大于0.8, 而我的package.json 里面的bcrypt版本为 0.77 ,所以编译出错。

回到顶部