2014-02-06 259 views
1

當我現在嘗試安裝包它給我以下錯誤:爲什麼安裝npm now包時會出現這個錯誤?

npm install now 
    npm WARN package.json [email protected] No repository field. 
    npm WARN package.json [email protected] No README data 
    npm http GET https://registry.npmjs.org/now 
    npm http 304 https://registry.npmjs.org/now 
    npm http GET https://registry.npmjs.org/node-proxy 
    npm http 304 https://registry.npmjs.org/node-proxy 
    npm WARN engine [email protected]: wanted: {"node":">=0.11.x","npm":">= 1.1.17"} (current: {"node":"v0.10.25","npm":"1.3.24"}) 
    npm http GET https://registry.npmjs.org/bindings 
    npm http GET https://registry.npmjs.org/nan 
    npm http 304 https://registry.npmjs.org/nan 
    npm http 304 https://registry.npmjs.org/bindings 

    > [email protected] install /home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/node_modules/now/node_modules/node-proxy 
    > node-gyp configure build 

    make: Entering directory `/home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/node_modules/now/node_modules/node-proxy/build' 
     CXX(target) Release/obj.target/nodeproxy/src/node-proxy.o 
    make: g++: Command not found 
    make: *** [Release/obj.target/nodeproxy/src/node-proxy.o] Error 127 
    make: Leaving directory `/home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/node_modules/now/node_modules/node-proxy/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:267:23) 
    gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:98:17) 
    gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:797:12) 
    gyp ERR! System Linux 3.8.0-35-generic 
    gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" 
    gyp ERR! cwd /home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/node_modules/now/node_modules/node-proxy 
    gyp ERR! node -v v0.10.25 
    gyp ERR! node-gyp -v v0.12.2 
    gyp ERR! not ok 
    npm ERR! [email protected] install: `node-gyp configure build` 
    npm ERR! Exit status 1 
    npm ERR! 
    npm ERR! Failed at the [email protected] install script. 
    npm ERR! This is most likely a problem with the node-proxy package, 
    npm ERR! not with npm itself. 
    npm ERR! Tell the author that this fails on your system: 
    npm ERR!  node-gyp configure build 
    npm ERR! You can get their info via: 
    npm ERR!  npm owner ls node-proxy 
    npm ERR! There is likely additional logging output above. 

    npm ERR! System Linux 3.8.0-35-generic 
    npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "now" 
    npm ERR! cwd /home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7 
    npm ERR! node -v v0.10.25 
    npm ERR! npm -v 1.3.24 
    npm ERR! code ELIFECYCLE 
    npm ERR! 
    npm ERR! Additional logging details can be found in: 
    npm ERR!  /home/ritzy1/Downloads/downloaded codes/drawing app/Paint_HTML5_Multi_Tutorial/Step7/npm-debug.log 
    npm ERR! not ok code 0 

我得到上述錯誤;我該如何解決它?

+0

你需要安裝node-gyp – micnic

回答

0

您需要在您的系統上安裝生成工具。根據目錄路徑,我可以假設你使用的是Linux。例如,在Ubuntu上,您可以安裝構建工具,如:sudo apt-get install -y build-essential,否則查看this README以查看需要安裝哪些工具。

+0

ya它工作謝謝 – Amit

相關問題