Ask Your Question

Revision history [back]

Getting ZMQ to install from NodeJS's NPM

Hi guys,

I'm new to Fedora (20) but familiar enough with Unix. I've been trying to get nodejs's npm to behave. I basically have a package.json file with the following in it:

  "name": "Quartz",
  "version": "0.0.2",
  "dependencies": {
    "async": "0.1.22",
    "cheerio": "0.10.3",
    "express": "2.5.9",
    "fstream": "0.1.25",
    "jquery-extend": "2.0.3",
    "passport": "0.1.8",
    "passport-local": "0.1.2",
    "pdfkit": "0.6.3",
    "protobuf": "0.11.0",
    "sax": "0.4.2",
    "": "0.9.6",
    "tar": "1.0.0",
    "tar.gz": "0.1.1",
    "xml2js": "0.2.7",
    "zmq": "2.7.0"

(I need to use these specific versions to allow us to compare to a known equivalent windows build - we're looking at porting to Linux as an OS).

The majority of this gets pulled down and installed fine, the exception being zmq@2.7.0 for which I'm getting the following result:

[andy@localhost webserver]$ npm install

npm WARN package.json Quartz@0.0.2 No description
npm WARN package.json Quartz@0.0.2 No repository field.
npm WARN package.json Quartz@0.0.2 No README data
npm http GET
npm http 304
npm http GET
npm http GET
npm http 304
npm http 304

> zmq@2.7.0 install /home/andy/dev/webserver/node_modules/zmq
> node-gyp rebuild

make: Entering directory `/home/andy/dev/webserver/node_modules/zmq/build'
  CXX(target) Release/
../ fatal error: zmq.h: No such file or directory
 #include <zmq.h>
compilation terminated.
make: *** [Release/] Error 1
make: Leaving directory `/home/andy/dev/webserver/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/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.17.3-200.fc20.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/andy/dev/webserver/node_modules/zmq
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok 
npm ERR! weird error 1
npm ERR! not ok code 0

Am I missing some form of development library that allows reference to this file or is there some form of EXPORT needed to define a path somewhere?

Any help will be very well received!