【发布时间】:2022-01-21 14:27:42
【问题描述】:
我正在尝试在 MacOS 11.5.2 上通过 npm install zeromq@5 安装 ZeroMQ v5,但出现以下错误:
其他规格: 节点 v16.2.0 - Python 2.7.16 - 节点gyp v3.8.0
npm ERR! code 1
npm ERR! command failed
npm ERR! command sh -c node-gyp-build || npm run build:libzmq
npm ERR! > zeromq@5.2.8 build:libzmq
npm ERR! > node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.2.0 | darwin | x64
npm ERR! (node:1703) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python2.7
npm ERR! No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
npm ERR! gyp: No Xcode or CLT version detected!
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:365:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.6.0
npm ERR! gyp ERR! node -v v16.2.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.2.0 | darwin | x64
npm ERR! (node:1724) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python2.7
npm ERR! gyp: No Xcode or CLT version detected!
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/Users/cdgmachado/node_modules/node-gyp/lib/configure.js:345:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:365:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.6.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/cdgmachado/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! node -v v16.2.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
有什么想法吗?
谢谢!
【问题讨论】:
-
No Xcode or CLT version detected!- 我认为它正在寻找 Xcode 或 CLT 安装,你有吗? -
我没有,这可能是问题所在。我最终选择了另一种方法,所以我从来没有深入了解这个@DarioPetrillo
标签: node.js npm npm-install zeromq failed-installation