安装zmq节点模块时出错

 云中之锦书 发布于 2023-01-08 16:24

安装zmq节点模块时,出现以下错误.我安装了最新的稳定版节点.

我在OS X 10.9.3上运行Mac

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

> zmq@2.7.0 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! zmq@2.7.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the zmq@2.7.0 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

为什么我会收到此错误,我该怎么做才能修复它?

1 个回答
  • 看起来你需要安装pkg-config:

    / bin/sh:找不到pkg-config:command

    尝试 brew install pkg-config

    2023-01-08 16:26 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有