2012-10-03 4 views
0
$ sudo npm install jsdom 
npm http GET https://registry.npmjs.org/jsdom 
npm http 304 https://registry.npmjs.org/jsdom 
.... 
[email protected] install /home/sadchandra/node_modules/jsdom/node_modules/contextify 
node-gyp rebuild 
make: Entering directory `/home/sadchandra/node_modules/jsdom/node_modules/contextify/build' 
    CXX(target) Release/obj.target/contextify/src/contextify.o 
make: g++: Command not found 
make: *** [Release/obj.target/contextify/src/contextify.o] Error 127 
make: Leaving directory `/home/sadchandra/node_modules/jsdom/node_modules/contextify/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/node-gyp/lib/build.js:236:23) 
gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:96:17) 
gyp ERR! stack  at Process._handle.onexit (child_process.js:678:10) 
gyp ERR! System Linux 3.2.0-30-generic-pae 
gyp ERR! command "node" "/usr/bin/node-gyp" "rebuild" 
gyp ERR! cwd /home/sadchandra/node_modules/jsdom/node_modules/contextify 
gyp ERR! node -v v0.8.11 
gyp ERR! node-gyp -v v0.7.0 
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected] 
[email protected] node_modules/jsdom 
├── [email protected] 
├── [email protected] 
└── [email protected] 

답변

6

우분투 설치시 g++ 바이너리가 누락되었습니다. g++을 설치하려면 sudo apt-get install g++을 실행 한 다음 다시 설치해야합니다.

+1

Centos/RHEL에서 equivilient는 sudo yum 그룹 설치 "개발 도구" – aqm

관련 문제