Homebrew

作者: e5a8d3183387 | 来源:发表于2020-05-07 13:39 被阅读0次

安装homebrew出现“curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused”

按照官方文档https://brew.sh/index_zh-cn 正常来说是可以很方便地安装homebrew的,偏偏被我遇到一个简单又很怪异的问题,这边文章记录一下出现的问题及解决方案。

当我执行如下命令:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

并未正常地进行下载、安装,而是出现

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

这样的报错。

解决

我先在浏览器访问链接:https://raw.githubusercontent.com/Homebrew/install/master/install ,发现也无法正常打开。只好采用修改hosts的方法:

打开https://www.ipaddress.com/

在搜索框输入对应网址并点击搜索:

得到查询结果:

编辑系统的hosts文件,添加一行:

199.232.28.133 raw.githubusercontent.com

再执行homebrew的安装命令,就可以了。

文章来源链接

相关文章

网友评论

    本文标题:Homebrew

    本文链接:https://www.haomeiwen.com/subject/ndtaghtx.html