node-gyp rebuild失败,zmq / build文件无法创建

时间:2016-07-06 05:08:55

标签: javascript node.js node-gyp

我使用npm install node-gyp运行良好,但是当我使用npm安装zmq时,node-gyp重建失败并且错误如下。我需要/ zmq / build来运行我的程序。

我尝试重新安装node-gyp但没有工作。以前有人遇到过这种情况吗?

  

zmq@2.15.3 install / lib / jinteki / netrunner / node_modules / zmq

node-gyp rebuild

make: Entering directory `/lib/jinteki/netrunner/node_modules/zmq/build'

CXX(target) Release/obj.target/zmq/binding.o../binding.cc:28:17: fatal 

error: zmq.h: No such file or directory

#include <zmq.h>
             ^

compilation terminated.

make: *** [Release/obj.target/zmq/binding.o] Error 1

make: Leaving directory `/lib/jinteki/netrunner/node_modules/zmq/build'

gyp ERR! build error 

gyp ERR! stack Error: `make` failed with exit code: 2

gyp ERR! stack     at ChildProcess.onExit (/usr/local/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:204:12)

gyp ERR! System Linux 3.13.0-86-generic

gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules
/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

gyp ERR! cwd /lib/jinteki/netrunner/node_modules/zmq

gyp ERR! node -v v6.2.2

gyp ERR! node-gyp -v v3.3.1

gyp ERR! not ok 

1 个答案:

答案 0 :(得分:0)

您没有安装适当的zeromq库标头。提供这些标头的软件包的名称因平台/发行版而异。有关完整的安装说明,请参阅zmq readme