源站不能直接打开,需要修改hosts:
1.查看网址
打开网站https://www.ipaddress.com/
查询一下 raw.githubusercontent.com对应的IP 地址
2.替换系统的host文件
注意:最好复制一份出来在更改
3.然后执行安装(来源官网:https://brew.sh/index_zh-cn.html)
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”
此方法适用于有vpn的伙伴使用,没有vpn的伙伴参考另一篇博客Mac换国内镜像源快速安装homebrew,使用brew