当前位置:首页 > 操作系统 > MacOs

macos – Sierra上的破命令行工具,无法安装Node.js本机包,构建Python等

我在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包,会发生这种情况:

<code>$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 
</code>

它在具有相同操作系统的同事的机器上工作正常.

我有时会看到App Store通知我Xcode 7.3的命令行工具升级似乎已关闭,也许我的设置有一些旧Xcode的剩余部分?

有任何想法吗?我觉得我还能尝试其他什么.

解决方法:

从您的日志中,看起来构建过程需要安装ccache.根据您的偏好,使用Homebrew或MacPorts安装ccache,然后再次尝试构建.


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐