美文网首页
21.xcode-select工具

21.xcode-select工具

作者: 杨强AT南京 | 来源:发表于2020-03-24 18:26 被阅读0次

问题

  • 碰见过下列错误吗?
localhost:~ yangqiang$ sudo npm --registry https://registry.npm.taobao.org install web3  -g  --unsafe-perm
Password:

> keccak@2.1.0 install /usr/local/lib/node_modules/web3/node_modules/keccak
> npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."


> keccak@2.1.0 rebuild /usr/local/lib/node_modules/web3/node_modules/keccak
> node-gyp rebuild

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
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:351:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/web3/node_modules/keccak
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keccak@2.1.0 rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the keccak@2.1.0 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/yangqiang/.npm/_logs/2020-03-24T08_34_43_162Z-debug.log
Keccak bindings compilation fail. Pure JS implementation will be used.

> secp256k1@3.8.0 install /usr/local/lib/node_modules/web3/node_modules/secp256k1
> npm run rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."


> secp256k1@3.8.0 rebuild /usr/local/lib/node_modules/web3/node_modules/secp256k1
> node-gyp rebuild

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
  • 关键点:
  gyp: No Xcode or CLT version detected!

解决办法

  • 安装xcode命令行编译开发工具

    • 每次xcode更新都要来一把。
  • 使用如下命令:

    • xcode-select --install
    • 安装需要一定时间。
  • 如果上面工具没有效果,请先执行:

    • sudo rm -rf $(xcode-select -print-path)
  • 操作截图:

    • 安装开发命令行工具
  • 安装web3的问题解决了。

Web3安装需要编译

相关文章

  • 21.xcode-select工具

    问题 碰见过下列错误吗? 关键点: 解决办法 安装xcode命令行编译开发工具每次xcode更新都要来一把。 使用...

  • 工具工具还是工具

    最近几天参加了一个数据分析的训练营,每天晚上8点钟开始,一直讲到10点多,老师很卖力,干货也很多。今天结营,就在这...

  • 2019-01-08 ps总结

    ps 抠图工具 套索工具 多边套索工具 文字工具 磁性套索工具 魔棒工具 渐变工具 蒙版 图章工具 alt 吸取颜...

  • 【工具箱-2-选区工具】

    【工具箱-2-选区工具】 【矩形选框工具组:】矩形选框工具、椭圆选框工具、单行选框工具、单列选框工具。 个人理解:...

  • AI 2019 Mac版常用快捷键大全

    移动工具:V 选取工具:A 钢笔工具:P 添加锚点工具:+ 删除锚点工具:- 文字工具:T 多边形工具:L 矩形、...

  • PS扣图

    1扣图工具 套索工具 多边套索工具 磁性套索工具 快速选择工具 魔棒工具 橡皮擦工具 背景橡皮擦工具 魔术橡皮擦工...

  • AI热键

    选择工具:v 直接选择工具:a 魔棒工具:y 套索工具:q 钢笔工具:p 转换描点工具:Ctrl+c 文字工具:t...

  • 工具?工具人?

    很多时候,我们发明工具的目的是方便工作,结果,适得其反,不仅没有方便,反而增添了工作量。原来往上级交个什么东西,都...

  • 工具的工具

    “一个人越是能够放弃一些东西,越是富有。”-《瓦尔登湖》 当人真正占有一些东西的时候,就成了它们的奴隶,尤其是那些...

  • 去觉知去用你的工具

    去觉知去用你的工具 在空性里, 身体是工具 思想是工具 情绪是工具 情感是工具 人性是工具 …… 发现这些工具 去...

网友评论

      本文标题:21.xcode-select工具

      本文链接:https://www.haomeiwen.com/subject/acxayhtx.html