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

Unable to install on OS X Mavericks

Open mateti opened this issue 12 years ago • 6 comments

npm install zmq fails in OS X Mavericks. Tried with both v3 and v4 of 0MQ.

../binding.cc:28:10: fatal error: 'zmq.h' file not found

include <zmq.h>

     ^

1 error generated. make: *** [Release/obj.target/zmq/binding.o] Error 1 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:267:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12) gyp ERR! System Darwin 13.0.0 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/smateti/Code/MC/CoreServices/branches/UUI/UUI/src/MC.VMs/LinuxServices/ingest/node_modules/zmq gyp ERR! node -v v0.10.24 gyp ERR! node-gyp -v v0.12.1 gyp ERR! not ok npm ERR! [email protected] install: node-gyp rebuild 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 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.

mateti avatar Jan 15 '14 16:01 mateti

How did you install the zeromq library? It’s worked fine for me with homebrew.

blalor avatar Jan 15 '14 17:01 blalor

I do not use homebrew. I installed from the source directly (tried with v3.2.4 as well):

curl http://download.zeromq.org/zeromq-4.0.3.tar.gz -o zeromq-4.0.3.tar.gz tar -zxf zeromq-4.0.3.tar.gz cd zeromq-4.0.3 sudo ./configure --prefix=/opt/tools/zmq sudo make install

mateti avatar Jan 15 '14 17:01 mateti

Did you include /opt/tools/zmq in your include path? Otherwise node-gyp won't be able to find it. You can also install it in standard location like /usr/local/.

mmalecki avatar Feb 19 '14 12:02 mmalecki

OK, dug down, it looks like the problem is same across most of the Mavericks bug listed here.

The rebuild failure in gyp-node is hiding an error from the Makefile. So if you try to manually make down in ~.npm/zmq/2.6.0/package, you will see that pkg-config is not found.

Basically, this package should check for pkg-config as a dependency. (I don't know how to to that, I'm way too nooob), but to install you use either macports or homebrew. See https://github.com/JustinTulloss/zeromq.node/issues/239

sudo port install pkgconfig

richtong avatar Apr 03 '14 05:04 richtong

Thank you @richtong, I was able to successfully install the package after i installed pkgconfig with homebrew

brew install pkgconfig

dfeddad avatar Aug 22 '14 09:08 dfeddad

Issue can be closed.

Downchuck avatar Jun 19 '15 19:06 Downchuck