Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intall Error: npm install zeromq --zmq-external #6

Closed
DenisCarriere opened this issue Apr 1, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@DenisCarriere
Copy link

commented Apr 1, 2019

Trying to unbox all-dapp-services

$ zeus --version
1.8.556
$ sudo -s zeus unbox all-dapp-services

✴️NPM Install zeromq --zmq-external @types/jest babel-polyfill eosjs-ecc text-encoding ws pako node-fetch
../binding.cc:28:10: fatal error: zmq.h: No such file or directory
 #include <zmq.h>
          ^~~~~~~
compilation terminated.
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/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.15.0-1034-aws
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/all-dapp-services/node_modules/zeromq
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zeromq@5.1.0 install: `node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the zeromq@5.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-04-01T18_17_31_440Z-debug.log

Error: npm install failed
    at _callee2$ (/root/all-dapp-services/extensions/hooks/post-install/01-npm.js:17:19)
    at tryCatch (/usr/lib/node_modules/@liquidapps/zeus-cmd/node_modules/babel-polyfill/node_modules/regenerator-runtime/runtime.js:65:40)
    at Generator.invoke [as _invoke] (/usr/lib/node_modules/@liquidapps/zeus-cmd/node_modules/babel-polyfill/node_modules/regenerator-runtime/runtime.js:303:22)
    at Generator.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/@liquidapps/zeus-cmd/node_modules/babel-polyfill/node_modules/regenerator-runtime/runtime.js:117:21)
    at step (/root/all-dapp-services/extensions/hooks/post-install/01-npm.js:5:191)
    at /root/all-dapp-services/extensions/hooks/post-install/01-npm.js:5:402
    at process._tickCallback (internal/process/next_tick.js:68:7)

When install zeromq with --zmq-external flag the install fails

$ npm install zeromq --zmq-external

> zeromq@5.1.0 install /root/node_modules/zeromq
> node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)

Requested to use external libzmq. Skipping download of prebuilt binaries.
Requested to use external libzmq. Skipping libzmq build
make: Entering directory '/root/node_modules/zeromq/build'
  CXX(target) Release/obj.target/zmq/binding.o
../binding.cc:28:10: fatal error: zmq.h: No such file or directory
 #include <zmq.h>
          ^~~~~~~
compilation terminated.
zmq.target.mk:99: recipe for target 'Release/obj.target/zmq/binding.o' failed
make: *** [Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory '/root/node_modules/zeromq/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/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.15.0-1034-aws
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node_modules/zeromq
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/root/package.json'
npm WARN root No description
npm WARN root No repository field.
npm WARN root No README data
npm WARN root No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zeromq@5.1.0 install: `node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the zeromq@5.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-04-01T18_20_38_590Z-debug.log
@DenisCarriere

This comment has been minimized.

Copy link
Author

commented Apr 1, 2019

Solution

Must have the following installed prior:

$ apt-get install libzmq3-dev

Might be good to document this install requirement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.