/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
执行命令报错
- 方法一:重装command line tools,再执行安装指令,homebrew安装成功
- 方法二:
原因:GitHub的raw.githubusercontent.com
域名解析被污染了
解决办法:通过修改hosts
解决此问题。
查询真实IP
在https://www.ipaddress.com/查询raw.githubusercontent.com的真实IP。
修改hosts
sudo vim /etc/hosts
添加如下内容: