美文网首页
mac 安装homobrew 报错解决

mac 安装homobrew 报错解决

作者: fuc_9034 | 来源:发表于2019-06-24 18:24 被阅读0次

mac升级到10.14.1版本安装homobrew报错

按照官网给的命令:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

执行后 报错:

xcode-select: error: invalid developer directory'/Library/Developer/CommandLineTools'
Failed during: /usr/bin/sudo /usr/bin/xcode-select --switch/Library/Developer/CommandLineTools

解决方法:

1.执行:xcode-select -p找到真正的路径
输出/Applications/Xcode.app/Contents/Developer即 xcode-select的有效路径

2.使用有效路径:/Applications/Xcode.app/Contents/Developer 替换 文件地址 中的 /Library/Developer/CommandLineTools

  • 先将内容复制到一个空白文件中
  • 将最后两处的/Library/Developer/CommandLineTools 改为/Applications/Xcode.app/Contents/Developer
  • 最后保存为名为 install的文件

3.进入保存的install文件目录下,执行 ruby -e "$(cat install)"即可

附上修改后的install文件 点击下载 提取码: cidv

相关文章

网友评论

      本文标题:mac 安装homobrew 报错解决

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