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

Package libzmq was not found in the pkg-config search path

Open dtinblack opened this issue 10 years ago • 14 comments

I've download zmq using "npm install zmq" but I got the following error:

Package libzmq was not found in the pkg-config search path.Perhaps you should add the directory containing `libzmq.pc' to the PKG_CONFIG_PATH environment variable No package 'libzmq' found gyp: Call to 'pkg-config libzmq --libs' returned exit status 1. while trying to load binding.gyp

I have put a work around in place as suggested from the error message - the software is working. However, I was wondering why the libzmq library couldn,t be found.

I have reloaded pkgconfiq ( via MacPorts ) and it is installed properly. I also checked the directory where libzmq is stored and it is at /usr/local/lib ( I installed the zeromq software from source ).

I am on Mac OS Mavericks, using Node v0.10.0, npm v1.2.17 and node-gyp v0.9.5

What other areas should I check ?

Grateful for any help.

dtinblack avatar Mar 01 '14 18:03 dtinblack

i got the same error.. zmq installation in mac kind a headache.. but here's what i do..

  1. install zmq using brew : brew install zmq
  2. export PKG_CONFIG_PATH=/usr/local/Cellar/zeromq/4.0.4/lib/pkgconfig/
  3. sudo visudo and add Defaults env_keep += "PKG_CONFIG_PATH"
  4. sudo npm install zmq

Hope it help..

trihatmaja avatar Aug 07 '14 05:08 trihatmaja

Didn't fixed my problem :(

manuels-mbp:~ manuellaufenberg$ npm install zmq

[email protected] install /Users/manuellaufenberg/node_modules/zmq node-gyp rebuild

Package libzmq was not found in the pkg-config search path. Perhaps you should add the directory containing `libzmq.pc' to the PKG_CONFIG_PATH environment variable No package 'libzmq' found gyp: Call to 'pkg-config libzmq --libs' returned exit status 1. while trying to load binding.gyp

SantoDE avatar Oct 14 '14 11:10 SantoDE

Nvm - fixed it :) Your approach worked. Thanks! :+1:

SantoDE avatar Oct 14 '14 12:10 SantoDE

Thanks @trihatmaja it help me.

expalmer avatar Dec 19 '14 16:12 expalmer

@trihatmaja THX, it works!

sit-in avatar Jan 14 '16 10:01 sit-in

@trihatmaja THX A million!!!

vlux avatar Feb 23 '16 15:02 vlux

I did:

  1. brew install zmq
  2. Added this line: export PKG_CONFIG_PATH=/usr/local/Cellar/zeromq/4.x.x/lib/pkgconfig/ to ~/.profile
  3. Restart terminals and run npm install zmq

And this worked for me.

alessandro-p avatar Feb 20 '17 09:02 alessandro-p

I had to update the permissions on /usr/local/share/man so that brew install could properly link everything. Then this worked.

controversial avatar Jun 29 '17 19:06 controversial

I did:

  1. brew install zmq
  2. export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig to ~/.profile
  3. run sudo npm install zmq -g --unsafe-perm=true --allow-root

chendong0120 avatar Sep 20 '17 09:09 chendong0120

I've installed zmq with brew and the environmental variable is correct and verified and I still get the same subject error message. I have also installed it from the source and get the same thing.

BUMPRW avatar Feb 12 '18 22:02 BUMPRW

@BUMPRW Try sudo npm install zmq -g --unsafe-perm=true --allow-root PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

zegway avatar Feb 23 '18 05:02 zegway

Sorry,

I should have got back on line and noted that was the solution.  I had a series of NPM files that required that action.

Sincerely,

Richard Bump

On Feb 22, 2018, at 11:57 PM, aethn [email protected] wrote:

@BUMPRW https://github.com/bumprw Try sudo npm install zmq -g --unsafe-perm=true --allow-root PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JustinTulloss/zeromq.node/issues/283#issuecomment-367917806, or mute the thread https://github.com/notifications/unsubscribe-auth/ASW-jakOmXVmvutHEma2RVKdR6frbDOnks5tXlM4gaJpZM4BmCq-.

BUMPRW avatar Feb 23 '18 13:02 BUMPRW

i got the same error.. zmq installation in mac kind a headache.. but here's what i do..

  1. install zmq using brew : brew install zmq
  2. export PKG_CONFIG_PATH=/usr/local/Cellar/zeromq/4.0.4/lib/pkgconfig/
  3. sudo visudo and add Defaults env_keep += "PKG_CONFIG_PATH"
  4. sudo npm install zmq

Hope it help..

I didn't need sudo to install zmq

jeffreyfate avatar Oct 04 '18 23:10 jeffreyfate

I had to be aware of latest version:

export PKG_CONFIG_PATH=/usr/local/Cellar/zeromq/4.3.1_1/lib/pkgconfig/

miqmago avatar Mar 11 '19 23:03 miqmago