macOS 安装 Homebrew 报错:Failed to connect to raw.githubusercontent.com port 443: Connection refused

参考:https://blog.csdn.net/txl910514/article/details/105880125

  1. 此时:ping raw.githubusercontent.com 是不通的
  2. 查询 raw.githubusercontent.com 的真实IP:https://ipaddress.com/website/raw.githubusercontent.com
  3. 执行:sudo vim /etc/hosts,新加入一行(其中:185.199.108.133 是我查询到的IP,可能会有变化):185.199.108.133 raw.githubusercontent.com
  4. 再次ping,能ping通的话,就可以正常安装了;
  5. 如果没有成功,换剩下的ip地址,多试几次。

posted on 2022-07-03 23:36  cag2050  阅读(315)  评论(0编辑  收藏  举报

导航