2012-08-15 69 views
5

我試圖使用安裝zeromq.nodezeromq.node安裝錯誤的Ubuntu 12.04: '節點GYP重建'

$ npm install zmq

不過,我不斷收到以下錯誤。任何幫助將非常感激。

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2 
gyp ERR! stack  at ChildProcess.onExit (/usr/share/npm/node_modules/node-gyp/lib/build.js:215:23) 
gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:91:17) 
gyp ERR! stack  at Process._handle.onexit (child_process.js:674:10) 
gyp ERR! System Linux 3.2.0-29-generic 
gyp ERR! command "node" "/usr/share/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /home/robot/code/game/node_modules/zmq 
gyp ERR! node -v v0.8.6 
gyp ERR! node-gyp -v v0.6.3 
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is most likely a problem with the zmq package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-gyp rebuild 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls zmq 
npm ERR! There is likely additional logging output above. 

npm ERR! System Linux 3.2.0-29-generic 
npm ERR! command "nodejs" "/usr/bin/npm" "install" "zmq" 
npm ERR! cwd /home/robot/code/game/test/amqp 
npm ERR! node -v v0.8.6 
npm ERR! npm -v 1.1.48 
npm ERR! code ELIFECYCLE 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /home/robot/code/game/test/amqp/npm-debug.log 
npm ERR! not ok code 0 
+0

「其他記錄詳細信息中可以找到:家用/機器人/代碼/遊戲/測試/ AMQP/NPM-的debug.log」。這個文件應該包含完整的錯誤描述。張貼在這裏。 – 2012-08-15 20:53:45

回答

8

GYP bulid錯誤,並試圖下面steps..it工作對我來說

$ sudo apt-get update 
$ sudo apt-get install build-essential 
$ sudo apt-get install libzmq-dev 
$ npm install zmq 
4

我設法通過以下this tutorial for installing the python-client.完成每一個我發現步驟後解決這個我用當時能夠通過NPM安裝node.zeromq模塊:

$ npm install zmq 

我猜這是由於缺少一些必需的文件。最有可能的是libzmq-dev。 libzmq開發及其依賴取出

+0

這一個http://stackoverflow.com/a/23732646/30946更有幫助。沒有很好的理由來安裝Python的東西來修復節點工具。 – jcollum 2014-08-25 21:18:16

+0

@jcollum謝謝 - 有道理。 – RobotEyes 2014-08-28 14:58:13