Closed hassan5134 closed 6 years ago
环境:node-v8.11.1
[root@test rap2-delos]# cnpm install ⠴ [23/64] Installing redeyed@~1.0.0make: Entering directory /root/rap2-delos/node_modules/_hiredis@0.5.0@hiredis/build' CC(target) Release/obj.target/hiredis-c/deps/hiredis/sds.o ⠴ [27/64] Installing utility@^1.12.0 CC(target) Release/obj.target/hiredis-c/deps/hiredis/read.o ⠸ [32/64] Installing @types/koa-generic-session@* AR(target) Release/obj.target/deps/hiredis-c.a ⠼ [32/64] Installing @types/koa-send@* COPY Release/hiredis-c.a ⠴ [32/64] Installing brace-expansion@^1.1.7 CXX(target) Release/obj.target/hiredis/src/hiredis.o ⠦ [34/64] Installing @types/mockjs@^1.0.0make: g++: Command not found make: *** [Release/obj.target/hiredis/src/hiredis.o] Error 127 make: Leaving directory/root/rap2-delos/node_modules/_hiredis@0.5.0@hiredis/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/node-v8.11.1-linux-x64/lib/node_modules/cnpm/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Linux 3.10.0-693.2.2.el7.x86_64 gyp ERR! command "/usr/local/node-v8.11.1-linux-x64/bin/node" "/usr/local/node-v8.11.1-linux-x64/lib/node_modules/cnpm/node_modules/npminstall/node-gyp-bin/node-gyp.js" "rebuild" gyp ERR! cwd /root/rap2-delos/node_modules/_hiredis@0.5.0@hiredis gyp ERR! node -v v8.11.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok [hiredis@~0.5.0] optional install error: Error: Run "sh -c node-gyp rebuild" error, exit code 1 at ChildProcess.proc.on.code (/usr/local/node-v8.11.1-linux-x64/lib/node_modules/cnpm/node_modules/runscript/index.js:74:21) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at maybeClose (internal/child_process.js:925:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
/root/rap2-delos/node_modules/_hiredis@0.5.0@hiredis/build' CC(target) Release/obj.target/hiredis-c/deps/hiredis/sds.o ⠴ [27/64] Installing utility@^1.12.0 CC(target) Release/obj.target/hiredis-c/deps/hiredis/read.o ⠸ [32/64] Installing @types/koa-generic-session@* AR(target) Release/obj.target/deps/hiredis-c.a ⠼ [32/64] Installing @types/koa-send@* COPY Release/hiredis-c.a ⠴ [32/64] Installing brace-expansion@^1.1.7 CXX(target) Release/obj.target/hiredis/src/hiredis.o ⠦ [34/64] Installing @types/mockjs@^1.0.0make: g++: Command not found make: *** [Release/obj.target/hiredis/src/hiredis.o] Error 127 make: Leaving directory
make
yum groupinstall 'Development Tools' 解决了
环境:node-v8.11.1
[root@test rap2-delos]# cnpm install ⠴ [23/64] Installing redeyed@~1.0.0make: Entering directory
/root/rap2-delos/node_modules/_hiredis@0.5.0@hiredis/build' CC(target) Release/obj.target/hiredis-c/deps/hiredis/sds.o ⠴ [27/64] Installing utility@^1.12.0 CC(target) Release/obj.target/hiredis-c/deps/hiredis/read.o ⠸ [32/64] Installing @types/koa-generic-session@* AR(target) Release/obj.target/deps/hiredis-c.a ⠼ [32/64] Installing @types/koa-send@* COPY Release/hiredis-c.a ⠴ [32/64] Installing brace-expansion@^1.1.7 CXX(target) Release/obj.target/hiredis/src/hiredis.o ⠦ [34/64] Installing @types/mockjs@^1.0.0make: g++: Command not found make: *** [Release/obj.target/hiredis/src/hiredis.o] Error 127 make: Leaving directory
/root/rap2-delos/node_modules/_hiredis@0.5.0@hiredis/build' gyp ERR! build error gyp ERR! stack Error:make
failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/node-v8.11.1-linux-x64/lib/node_modules/cnpm/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Linux 3.10.0-693.2.2.el7.x86_64 gyp ERR! command "/usr/local/node-v8.11.1-linux-x64/bin/node" "/usr/local/node-v8.11.1-linux-x64/lib/node_modules/cnpm/node_modules/npminstall/node-gyp-bin/node-gyp.js" "rebuild" gyp ERR! cwd /root/rap2-delos/node_modules/_hiredis@0.5.0@hiredis gyp ERR! node -v v8.11.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok [hiredis@~0.5.0] optional install error: Error: Run "sh -c node-gyp rebuild" error, exit code 1 at ChildProcess.proc.on.code (/usr/local/node-v8.11.1-linux-x64/lib/node_modules/cnpm/node_modules/runscript/index.js:74:21) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at maybeClose (internal/child_process.js:925:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)