问题描述:

I have a CentOS 7.1 with Nodejs v0.12.4

when I try to install mongoose npm install mongoose I get this error:

>[email protected] install /home/node/www/broker/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos

> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/home/node/www/broker/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build'

CXX(target) Release/obj.target/kerberos/lib/kerberos.o

make: Leaving directory `/home/node/www/broker/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/build'

npm WARN installMany nopt was bundled with [email protected], but bundled package wasn't found in unpacked tree

npm WARN installMany npmlog was bundled with [email protected], but bundled package wasn't found in unpacked tree

npm WARN installMany request was bundled with [email protected], but bundled package wasn't found in unpacked tree

npm WARN installMany semver was bundled with [email protected], but bundled package wasn't found in unpacked tree

npm WARN installMany tar was bundled with [email protected], but bundled package wasn't found in unpacked tree

npm WARN installMany tar-pack was bundled with [email protected], but bundled package wasn't found in unpacked tree

npm WARN installMany mkdirp was bundled with [email protected], but bundled package wasn't found in unpacked tree

npm WARN installMany rc was bundled with [email protected], but bundled package wasn't found in unpacked tree

npm WARN installMany rimraf was bundled with [email protected], but bundled package wasn't found in unpacked tree

\

> [email protected] install /home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext

> (node-pre-gyp install --fallback-to-build) || (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext/build'

CXX(target) Release/obj.target/bson/ext/bson.o

make: g++: Command not found

make: *** [Release/obj.target/bson/ext/bson.o] Error 127

make: Leaving directory `/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext/build'

gyp ERR! build error

gyp ERR! stack Error: `make` failed with exit code: 2

gyp ERR! stack at ChildProcess.onExit (/home/node/www/broker/node_modules/node-gyp/lib/build.js:269:23)

gyp ERR! stack at ChildProcess.emit (events.js:110:17)

gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)

gyp ERR! System Linux 3.10.0-229.4.2.el7.x86_64

gyp ERR! command "/usr/local/bin/node" "/home/node/www/broker/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext/build/Release/bson.node" "--module_name=bson" "--module_path=/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext/build/Release"

gyp ERR! cwd /home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext

gyp ERR! node -v v0.12.4

gyp ERR! node-gyp -v v2.0.0

gyp ERR! not ok

node-pre-gyp ERR! build error

node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /home/node/www/broker/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext/build/Release/bson.node --module_name=bson --module_path=/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext/build/Release' (1)

node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext/node_modules/node-pre-gyp/lib/util/compile.js:83:29)

node-pre-gyp ERR! stack at ChildProcess.emit (events.js:110:17)

node-pre-gyp ERR! stack at maybeClose (child_process.js:1015:16)

node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

node-pre-gyp ERR! System Linux 3.10.0-229.4.2.el7.x86_64

node-pre-gyp ERR! command "node" "/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"

node-pre-gyp ERR! cwd /home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext

node-pre-gyp ERR! node -v v0.12.4

node-pre-gyp ERR! node-pre-gyp -v v0.6.4

node-pre-gyp ERR! not ok

Failed to execute '/usr/local/bin/node /home/node/www/broker/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext/build/Release/bson.node --module_name=bson --module_path=/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext/build/Release' (1)

make: Entering directory `/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext/build'

CXX(target) Release/obj.target/bson/ext/bson.o

make: Leaving directory `/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson-ext/build'

[email protected] node_modules/mongoose

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected]

├── [email protected] ([email protected], [email protected])

├── [email protected] ([email protected], [email protected])

└── [email protected] ([email protected])

相关阅读:
Top