安装brew
- 首先安装brew,已经安装的则跳至下一步
/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
原因是https://raw.githubusercontent.com这个域名被国内和谐了,但是我们可以通过真实ip来进行访问。
- 在https://www.ipaddress.com/查询raw.githubusercontent.com的真实IP。
- 修改hosts
sudo vim /etc/hosts
- 添加