-
Notifications
You must be signed in to change notification settings - Fork 284
node-gyp rebuild failed on installation #571
Comments
I have had the same problem. What I found http://stackoverflow.com/questions/21365714/nodejs-error-installing-with-npm |
If you want zeromq yet don't want to have to bother with building with |
I wanted just a single nodejs package which can do a job. Your prebuilt package still has too many dependencies |
Ok, good luck! |
Same error for $ npm install zmq versions: node v7.0.0 system: Darwin 16.1.0 Darwin Kernel Version 16.1.0: Thu Oct 13 21:26:57 PDT 2016; /bin/sh: pkg-config: command not found npm ERR! Darwin 16.1.0 npm ERR! zmq@2.15.3 install: npm ERR! Exit status 1427 error Darwin 16.1.0 658 433 error Failed at the zmq@2.15.3 install script 'node-gyp rebuild'. |
Same error here on CentOS 6:
I also tried using zmq-prebuilt which resulted in errors:
It would appear that ZMQ does not work with newer versions of NodeJS, or that it does not work well on Linux-based machines, due to the many dependencies required. Is there a specific version of NodeJS that is recommended? |
We ended up deprecating / changing the name of |
@rgbkrk I had tried both commands, and both failed with the same error message. The module was not installed. using the command
|
/cc @lgeiger |
It looks like the prebuilds didn't install for you and it's going back to a source based installation. Sadly the traceback doesn't say much about what the missing pieces might be. We have a guide for building from source which would be good to cross reference to see if you have all the dependencies. To get a better, non-hidden traceback you can run these directly
|
I have found the problem! It's not mentioned in the installation documentation, which may need to be updated to help future users. The problem was that the zeromq installation requires a c++11 compiler. If you are using a compiler below version 4.8.x, then the install will fail. Since CentOS comes by default with version 4.4, if it is not upgraded, the zeromq install fails. The error results from an error involving an unexpected '<' somewhere in the build. However, with a c++11 compiler, it builds successfully. Instructions on upgrading your gcc version can be found here: https://edwards.sdsu.edu/research/c11-on-centos-6/ Once I did this, the setup ran perfectly using the command |
I'm glad you got it working! |
@parasin that worked perfectly as well. finally after a year or something of dealing with this problem heh... not the most ideal fix but at least there is a fix. |
gyp ERR! build error
gyp ERR! stack Error:
make
failed with exit code: 2gyp ERR! stack at ChildProcess.onExit (/home/debby/.nvm/versions/node/v6.6.0/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:215:12)
gyp ERR! System Linux 3.16.0-4-amd64
gyp ERR! command "/home/debby/.nvm/versions/node/v6.6.0/bin/node" "/home/debby/.nvm/versions/node/v6.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/debby/Documents/dev/bot/app/bot/src/node_modules/zmq
gyp ERR! node -v v6.6.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/home/debby/.nvm/versions/node/v6.6.0/bin/node" "/home/debby/.nvm/versions/node/v6.6.0/bin/npm" "install" "zmq" "--save"
npm ERR! node v6.6.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! zmq@2.15.3 install:
node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq@2.15.3 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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
The text was updated successfully, but these errors were encountered: