折腾了好久,执行
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
开始一直报错Failed to connect to raw.githubusercontent.com port 443: Connection refused error: Error: 7,
尝试过改动git config的代理,没有用,
换中科大的源,也没有用
最后解决办法如下。
方法一:
参考 https://blog.youkuaiyun.com/m0_37136046/article/details/106425286
sudo vi /etc/hosts
在host中加入以下
199.232.28.133 raw.githubusercontent.com
再重新执行
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
方法2:
重装command line tools,再执行安装指令,homebrew安装成功。
- removing the old tools
rm -rf /Library/Developer/CommandLineTools
- install xcode command line tools again
xcode-select --install
- 执行
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"