2014-06-18 4 views
2

При установке модуля zmq node появляется следующая ошибка. У меня установлена ​​последняя стабильная версия узла.Ошибка при установке модуля узла zmq

Я бегу Mac на OS X 10.9.3

npm http GET https://registry.npmjs.org/zmq 
npm http 304 https://registry.npmjs.org/zmq 
npm http GET https://registry.npmjs.org/nan 
npm http GET https://registry.npmjs.org/bindings 
npm http 304 https://registry.npmjs.org/nan 
npm http 304 https://registry.npmjs.org/bindings 

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

/bin/sh: pkg-config: command not found 
gyp: Call to 'pkg-config libzmq --libs' returned exit status 127. 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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:340:16) 
gyp ERR! stack  at ChildProcess.emit (events.js:98:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:809:12) 
gyp ERR! System Darwin 13.2.0 
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /Users/mario/node_modules/zmq 
gyp ERR! node -v v0.10.29 
gyp ERR! node-gyp -v v0.13.0 
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! 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 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls zmq 
npm ERR! There is likely additional logging output above. 

npm ERR! System Darwin 13.2.0 
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "zmq" 
npm ERR! cwd /Users/mario/messaging 
npm ERR! node -v v0.10.29 
npm ERR! npm -v 1.4.9 
npm ERR! code ELIFECYCLE 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /Users/mario/messaging/npm-debug.log 
npm ERR! not ok code 0 

Почему я получаю эту ошибку, и что я должен сделать, чтобы это исправить?

+0

Вы уже [установлен ZMQ] (HTTP : //zeromq.org/intro: получить-на-программное обеспечение)? Он должен быть установлен перед модулем node.js, который просто привязан к уже установленному пакету. – Jason

+0

Да, я установил zmq с Homebrew. 'brew install zmq' – hyprstack

+0

Тем временем я удалил _npm_, чтобы переустановить его, и теперь у меня возникли проблемы с его установкой! Когда я набираю 'npm install -g', он возвращает' npm: command not found' – hyprstack

ответ

7

Похоже, вам нужно установить pkg-config:

/бен/ш: PKG-конфигурации: команда не найдена

Попробуйте brew install pkg-config

Смежные вопросы