新版mac安装homebrew失败

错误信息

按照规范搞法用如下命令安装之后报错

/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 --install手动安装
2.sudo xcode-select -s /Applications/Xcode.app/Contents/Developer更换xcode tools地址

最终定位为xcode版本和macos系统版本不一致,导致appstore上无法正常更新,xcode-select --install下载也出现版本问题,最终解决方案如下
1.登陆https://developer.apple.com/download/more/
2.找到对应的Command Line Tools文件,下载并安装,我这里选的是这一个

新版mac安装homebrew失败

参考资料:
1.https://blog.csdn.net/yiifaa/article/details/77509546
2.https://blog.csdn.net/berryreload/article/details/70235618
3.https://blog.csdn.net/lucky9322/article/details/79036877

相关文章:

  • 2021-08-22
  • 2021-12-03
  • 2022-02-12
  • 2022-01-20
  • 2021-05-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-24
  • 2021-09-04
  • 2021-12-25
  • 2022-12-23
  • 2021-11-23
相关资源
相似解决方案