2016-11-03 3 views
0

방랑자bento/centos-6.7 상자를 실행 중입니다. 내 노드 버전은 v6.9.1이고 내 npm 버전은 3.10.8입니다. 내가 npm install [email protected]를 실행하면 나는 다음과 같은 오류가 발생합니다 :Centos 6.7에서 좀비 4.2.1을 설치하면 NPM 오류가 발생합니다.

node-gyp rebuild 

make: Entering directory `/home/vagrant/zombie-test/node_modules/bufferutil/build' 
    CXX(target) Release/obj.target/bufferutil/src/bufferutil.o 
In file included from ../src/bufferutil.cc:16: 
../../nan/nan.h:43:3: error: #error This version of node/NAN/v8 requires a C++11 compiler 
In file included from ../src/bufferutil.cc:7: 

/* stack trace */ 

make: Leaving directory `/home/vagrant/zombie-test/node_modules/bufferutil/build' 
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2 
gyp ERR! stack  at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) 
gyp ERR! stack  at emitTwo (events.js:106:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:191:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) 
gyp ERR! System Linux 2.6.32-573.el6.x86_64 
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /home/vagrant/zombie-test/node_modules/bufferutil 
gyp ERR! node -v v6.9.1 
gyp ERR! node-gyp -v v3.4.0 
gyp ERR! not ok 

Full stack trace here

두 노드와 NPM은 this instructions을 사용하여 설치된 :이 오류에 대한

$ curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - 
$ yum -y install nodejs 

공지 된 솔루션?

답변

1

새로운 gcc/g ++ 버전 (CentOS6과 함께 제공되는 버전이 너무 오래되었습니다)이 필요합니다. 이것 좀보세요 : http://linux.web.cern.ch/linux/devtoolset/ - 건물 도구를 알맞은 버전이나 최신 버전으로 업데이트 할 수 있습니다.

관련 문제