Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/mongodb/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js CentOS 7.1上的猫鼬_Node.js_Mongodb_Mongoose_Centos - Fatal编程技术网

Node.js CentOS 7.1上的猫鼬

Node.js CentOS 7.1上的猫鼬,node.js,mongodb,mongoose,centos,Node.js,Mongodb,Mongoose,Centos,我有一个CentOS 7.1和Nodejs v0.12.4 当我尝试安装mongoosenpm install mongoose时,出现以下错误: >kerberos@0.0.12 install /home/node/www/broker/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos > (node-gyp rebuild 2> builde

我有一个CentOS 7.1和Nodejs v0.12.4

当我尝试安装mongoose
npm install mongoose
时,出现以下错误:

>kerberos@0.0.12 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 node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany npmlog was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany request was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany semver was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany tar was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany tar-pack was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany mkdirp was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany rc was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
npm WARN installMany rimraf was bundled with node-pre-gyp@0.6.4, but bundled package wasn't found in unpacked tree
\
> bson-ext@0.1.7 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'
mongoose@4.0.3 node_modules/mongoose
├── regexp-clone@0.0.1
├── sliced@0.0.5
├── muri@1.0.0
├── hooks-fixed@1.0.1
├── mpromise@0.5.4
├── kareem@1.0.1
├── mpath@0.1.1
├── async@0.9.0
├── ms@0.1.0
├── mquery@1.5.1 (debug@0.7.4, bluebird@2.9.9)
├── mongodb@2.0.30 (readable-stream@1.0.31, mongodb-core@1.1.26)
└── bson@0.3.2 (bson-ext@0.1.7)
>kerberos@0.0.12安装/home/node/www/broker/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb core/node_modules/kerberos
>(节点gyp rebuild 2>builderror.log)| |(退出0)
make:进入目录“/home/node/www/broker/node\u modules/mongoose/node\u modules/mongodb/node\u modules/mongodb core/node\u modules/kerberos/build”
CXX(目标)发行版/obj.target/kerberos/lib/kerberos.o
make:离开目录“/home/node/www/broker/node\u modules/mongoose/node\u modules/mongodb/node\u modules/mongodb core/node\u modules/kerberos/build”
npm WARN installMany nopt与node pre捆绑在一起-gyp@0.6.4,但在解包树中未找到捆绑包
npm警告installMany npmlog与node pre捆绑在一起-gyp@0.6.4,但在解包树中未找到捆绑包
npm WARN installMany请求与node pre绑定-gyp@0.6.4,但在解包树中未找到捆绑包
npm WARN installMany semver与node pre捆绑在一起-gyp@0.6.4,但在解包树中未找到捆绑包
npm WARN installMany tar与node pre捆绑在一起-gyp@0.6.4,但在解包树中未找到捆绑包
npm WARN installMany tar pack与node pre捆绑在一起-gyp@0.6.4,但在解包树中未找到捆绑包
npm WARN INSTALLANY许多mkdirp与node pre捆绑在一起-gyp@0.6.4,但在解包树中未找到捆绑包
npm WARN installMany rc与node pre捆绑在一起-gyp@0.6.4,但在解包树中未找到捆绑包
npm警告:许多rimraf与node pre捆绑在一起-gyp@0.6.4,但在解包树中未找到捆绑包
\
>布森-ext@0.1.7安装/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson ext
>(节点预gyp安装--回退到生成)| |(节点gyp重建2>builderror.log)| |(退出0)
make:进入目录“/home/node/www/broker/node\u modules/mongoose/node\u modules/bson/node\u modules/bson ext/build”
CXX(目标)发布/obj.target/bson/ext/bson.o
make:g++:未找到命令
make:**[Release/obj.target/bson/ext/bson.o]错误127
make:离开目录“/home/node/www/broker/node\u modules/mongoose/node\u modules/bson/node\u modules/bson ext/build”
哎呀!构建错误
哎呀!堆栈错误:`make`失败,退出代码:2
哎呀!堆栈位于ChildProcess.onExit(/home/node/www/broker/node_modules/node gyp/lib/build.js:269:23)
哎呀!ChildProcess.emit上的堆栈(events.js:110:17)
哎呀!在Process.ChildProcess.\u handle.onexit(child\u Process.js:1074:12)处堆栈
哎呀!系统Linux 3.10.0-229.4.2.el7.x86_64
哎呀!命令“/usr/local/bin/node”“/home/node/node_modules/www/broker/node_modules/node gyp/bin/node gyp.js”“build”“--fallback to build”“--module=/home/node/node_modules/mongoose/node_modules/bson ext/build/Release/bson.node”“--module_name=bson”“--模块路径=/home/node/www/broker/node\u modules/mongoose/node\u modules/bson/node\u modules/bson ext/build/Release”
gyp ERR!cwd/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson ext
gyp ERR!节点-v v0.12.4
gyp ERR!节点gyp-Vv2.0.0
哎呀!不行
节点预gyp错误!生成错误
node pre-gyp ERR!堆栈错误:未能执行'/usr/local/bin/node/node/home/node/node\u modules/node-gyp/bin/node-gyp.js build--fallback to build--module=/home/node/node\u modules/mongoose/node\u modules/bson-ext/build/Release/bson.node--\u name=bson--modules\u-path=/home/node/broker/node/node\u modules/mongoose/节点模块/bson/node模块/bson ext/build/Release'(1)
node pre-gyp ERR!在ChildProcess上堆栈。(/home/node/broker/node_modules/mongoose/node_modules/bson/node_modules/bson ext/node_modules/node pre-gyp/lib/util/compile.js:83:29)
ChildProcess.emit(events.js:110:17)上的节点pre-gyp ERR!堆栈
maybeClose的节点前gyp ERR!堆栈(child_process.js:1015:16)
node pre-gyp ERR!在Process.ChildProcess.\u handle.onexit(child\u Process.js:1087:5)处堆栈
node pre-gyp ERR!System Linux 3.10.0-229.4.2.el7.x86_64
node pre-gyp ERR!命令“node”“/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson ext/node_modules/.bin/node pre-gyp”“install”“--回退到构建”
node pre-gyp ERR!cwd/home/node/www/broker/node_modules/mongoose/node_modules/bson/node_modules/bson ext
节点前gyp错误!节点-v v0.12.4
节点预gyp错误!节点预gyp-v v0.6.4
节点预gyp错误!不正常
未能执行'/usr/local/bin/node/home/node/node/modules/node-gyp/bin/node-gyp.js build--fallback to build--module=/home/node/node/node/modules/mongoose/node/modules/bson/node/bson ext/build/Release/bson.node---modules\u-path=/home/node/node/www/broker/node/node/mongoose/node/modules/bson/node\modules/bson ext/build/Release'(1)
make:进入目录“/home/node/www/broker/node\u modules/mongoose/node\u modules/bson/node\u modules/bson ext/build”
CXX(目标)发布/obj.target/bson/ext/bson.o
make:离开目录“/home/node/www/broker/node\u modules/mongoose/node\u modules/bson/node\u modules/bson ext/build”
mongoose@4.0.3节点单元模块/猫鼬
├── 正则表达式-clone@0.0.1
├── sliced@0.0.5
├── muri@1.0.0
├── 钩子-fixed@1.0.1
├── mpromise@0.5.4
├── kareem@1.0.1
├── mpath@0.1.1
├── async@0.9.0
├── ms@0.1.0
├── mquery@1.5.1 (debug@0.7.4, bluebird@2.9.9)
├── mongodb@2.0.30(可读-stream@1.0.31,mongodb-core@1.1.26)
└── bson@0.3.2(bson)-ext@0.1.7)

>你似乎缺少一个C++编译器(除了其他事情)。工作。如果你想回答“SUDO YUM安装GCC-C++”,我会接受它,它没有解决警告,所以我假设有些事情仍然没有按计划工作,但是我很高兴解决了错误。