bitcore icon indicating copy to clipboard operation
bitcore copied to clipboard

npm install -g bitcore fails with zmq dependency error

Open Standaa opened this issue 6 years ago • 2 comments
trafficstars

Hello, running npm install -g bitcore does not work on my end. I am running under Mac OS Mojave and have tried all recommended versions of node, by using nvm.

I have also tried to clone different versions of the repo but I always end up stuck with the same error :

Package libunwind was not found in the pkg-config search path.
Perhaps you should add the directory containing `libunwind.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libunwind', required by 'libzmq', not found
gyp: Call to 'pkg-config libzmq --cflags-only-I | sed s/-I//g' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/stas/.nvm/versions/node/v11.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:188:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/Users/stas/.nvm/versions/node/v11.6.0/bin/node" "/Users/stas/.nvm/versions/node/v11.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/stas/.nvm/versions/node/v11.6.0/lib/node_modules/bitcore/node_modules/zmq
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/bitcore/node_modules/utf-8-validate):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1

Correct me if I am wrong but Bitcore seems to still be relying on zmq. However, the zmq lib is no longer maintained and has replaced with zeromq as mentioned by the authors here

Zeromq does compile as expected on my laptop.

I have gone to great lengths trying to fix that issue, by following any track I could find on SO and Github. I went as far as compiling libunwind, without any success.

Is an update to zeromq on the roadmap ?

Thanks !

Standaa avatar Jan 15 '19 16:01 Standaa

Any news on this issue?

chewy94 avatar Mar 25 '19 16:03 chewy94

Still happens at 2022

elpddev avatar Apr 10 '22 12:04 elpddev