0
我想在redHat上安裝使用npm的bcrypt,我使用它在我的Windows開發環境中工作,但是當我嘗試將它移植到Unix測試時失敗。bcrypt make:execvp:g ++:不是目錄
我正在故宮intall bcrypt和recieving以下的輸出:
$ ../../nodejs/bin/npm install bcrypt
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
-
> [email protected] install /app/party/site/node_modules/bcrypt
> node-gyp rebuild
make: Entering directory `/app/party/site/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
make: execvp: g++: Not a directory
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 127
make: Leaving directory `/app/party/site/node_modules/bcrypt/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/app/nodejs/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:810:12)
gyp ERR! System Linux 2.6.18-371.el5
gyp ERR! command "node" "/app/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /app/party/site/node_modules/bcrypt
gyp ERR! node -v v0.10.31
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 Linux 2.6.18-371.el5
npm ERR! command "/app/nodejs/bin/node" "/app/nodejs/bin/npm" "install" "bcrypt"
npm ERR! cwd /app/party/site
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /app/party/site/npm-debug.log
npm ERR! not ok code 0
我一直在谷歌上搜索了幾個小時,但爲什麼這種失敗不能工作了 - 請幫助!
您是否安裝了編譯插件所需的所有需求(例如gcc,g ++,python 2.x等)? – mscdex 2014-10-17 21:11:47
我已經安裝了Python 2.7,我也運行npm install node-gyp和npm install gcc。我認爲g ++包含在gcc中? – user2997982 2014-10-18 10:15:02
您可以通過發行版的軟件包管理器安裝gcc和g ++,而不是npm。 – mscdex 2014-10-18 14:39:26