解决macOS 10.13下 homebrew 一安装报错问题

解决macOS 10.13下 homebrew 一安装报错问题

错误描述:Error downloading Command Line Tools (macOS High Sierra version 10.13) for Xcode

在终端敲命令:/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”安装homebrew出现上述错误git

这个缘由是由于以前我从apple官网上下了最新的xcode-9.4新版,新版的可能跟旧版的好像不太同样,xcode的命令行工具再也不安装在
/Library/Developer/CommandLineTools 这个位置了,这个时候只须要使用这个命令设置一下就能够了:
sudo xcode-select –switch /Applications/Xcode.appgithub

最后再输入命令这个验证一下:
xcode-select -pweb

打印输出:
/Applications/Xcode.app/Contents/Developermacos

这样再回头去安装homebrew 就一切正常了!
这里写图片描述xcode

OK,大功告成!!!ruby