国内用户安装brew&github加速方法

安装brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  • 执行时会遇到 curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused错误

  • 原因:github的一些域名的 DNS 解析被污染,导致DNS解析过程无法通过域名取得正确的IP地址。

  • 解决方式:打开 https://www.ipaddress.com/ 输入访问不了的域名(raw.githubusercontent.com),查询之后可以获得正确的IP地址,在本机的 host文件中添加即可,建议使用 switchhosts 方便 host 管理

github加速

github.com
assets-cdn.github.com
github.global.ssl.fastly.net
  • 打开 https://www.ipaddress.com/ 输入以上域名,查询之后可以获得正确的IP地址,在本机的 host文件中添加即可,建议使用 switchhosts 方便 host 管理

host文件地址

C:\Windows\System32\drivers\etc
1 个赞

最新安装方法