zeromq.node icon indicating copy to clipboard operation
zeromq.node copied to clipboard

fatal error: zmq.h: No such file or directory (ubuntu 12.04, node 0.10.26)

Open jcollum-hcg opened this issue 11 years ago • 3 comments

Installed ZMQ via the instructions here: http://zeromq.org/intro:get-the-software

Then installed ZMQ via npm install zmq. Results:

> node-gyp rebuild

make: Entering directory `/home/xyz/app-build-0.60/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
compilation terminated.
make: *** [Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory `/home/xyz/app-build-0.60/node_modules/zmq/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/hcg/.nvm/v0.10.26/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.11.0-15-generic
gyp ERR! command "node" "/home/hcg/.nvm/v0.10.26/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/xyz/app-build-0.60/node_modules/zmq
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2

Can I test whether zmq is working? There is no make test target for it.

jcollum-hcg avatar Feb 19 '14 23:02 jcollum-hcg

Looks like sudo make install is required to use ZMQ with node. The docs for ZMQ imply that that is optional.

Zeromq.node should be doing some sort of check to see if ZMQ is available system-wide and give a better error message (while installing).

jcollum-hcg avatar Feb 19 '14 23:02 jcollum-hcg

I had the same problem with Centos 6.5.

I installed the yum install zeromq-devel and worked.

andronat avatar May 31 '14 20:05 andronat

For ubuntu this worked.

shakdwipeea avatar Jun 25 '15 11:06 shakdwipeea