簡體   English   中英

無法在ubuntu中安裝jsdom

[英]unable to install jsdom in ubuntu

$ sudo npm install jsdom 
npm http GET https://registry.npmjs.org/jsdom
npm http 304 https://registry.npmjs.org/jsdom
....
 contextify@0.1.3 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 contextify@0.1.3
jsdom@0.2.15 node_modules/jsdom
├── cssom@0.2.5
├── htmlparser@1.7.6
└── request@2.11.4

您在Ubuntu安裝中缺少g++二進制文件。 您需要運行sudo apt-get install g++來安裝g++ ,然后嘗試再次安裝。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM