美文网首页
curl: (7) Failed to connect to r

curl: (7) Failed to connect to r

作者: 小白这么吃香 | 来源:发表于2020-04-25 23:13 被阅读0次

homebrew网站:https://brew.sh/index_zh-cn

安装失败,出现标题的错误,执行一下操作即可:

方案一:

在终端输入下面命令:

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)”

来自知乎大神技术文章:

https://zhuanlan.zhihu.com/p/111014448

方案二:(不推荐,下载还是很慢)

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

查询 raw.githubusercontent.com 对应的IP地址为:199.232.68.133

然后添加host

在finder中前往/etc,找到hosts文件,复制一份出来,因为不允许直接修改

在复制的hosts文件中添加 :

199.232.68.133   raw.githubusercontent.com #安装homebrew

然后将该文件拖到/etc文件中覆盖,操作完之后在终端执行下面命令即可快速安装了:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”

相关文章

网友评论

      本文标题:curl: (7) Failed to connect to r

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