我在macOS Sierra 10.12.1(16B2555)上使用Xcode 8.1&已安装命令行工具但我无法安装任何Node.js本机附加组件,我无法编译Python等.
我尝试删除Xcode和命令行工具(后者通过删除/ Library / Developer / CommandLineTools),然后通过xcode-select –install从App Store和命令行工具重新安装Xcode,但问题仍然存在.例如,如果我尝试在Node.js 7.2.0或6.9.1上安装contextify npm包,会发生这种情况:
$npm install contextify
> contextify@0.1.15 install /Users/mgol/_/node_modules/contextify
> node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
CXX(target) Release/obj.target/contextify/src/contextify.o
make: ccache: No such file or directory
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
gyp ERR! build error
它在具有相同操作系统的同事的机器上工作正常.
我有时会看到App Store通知我Xcode 7.3的命令行工具升级似乎已关闭,也许我的设置有一些旧Xcode的剩余部分?
有任何想法吗?我觉得我还能尝试其他什么.
解决方法:
从您的日志中,看起来构建过程需要安装ccache.根据您的偏好,使用Homebrew或MacPorts安装ccache,然后再次尝试构建.
原文地址:https://codeday.me/bug/20190818/1693387.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。