homebrew出错: Failed to connect to raw.githubusercontent.com port 443

/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 error: Error: 7,

尝试过改动git config的代理,没有用,

换中科大的源,也没有用

最后解决办法如下,重装command line tools,再执行安装指令,homebrew安装成功。

removing the old tools (rm -rf /Library/Developer/CommandLineTools) install xcode command line tools again ( xcode-select --install).
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

方法二

问题:macOS安装Homebrew时总是报错(Failed to connect to raw.githubusercontent.com port 443: Connection refused)

原因:由于某些你懂的因素,导致GitHub的raw.githubusercontent.com域名解析被污染了。

解决办法:通过修改hosts解决此问题。

查询真实IP

https://www.ipaddress.com/查询raw.githubusercontent.com的真实IP。

E727DDB889ADB32E2B579D005BCACC6A.jpg

修改hosts

sudo vim /etc/hosts

添加如下内容:

199.232.28.133 raw.githubusercontent.com
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容