执行homebrew的安装命令报错:
Failed to connect to raw.githubusercontent.com port 443: Connection refused
解决办法:
- 修改hosts
sudo vim /etc/hosts
- 添加如下内容:
199.232.28.133 raw.githubusercontent.com
- 重新执行安装命令,国内源
/bin/bash -c "$(curl -fsSL /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
注:最好挂上梯子,因为可能会自动更新下载Command Line Tools for Xcode,文件比较大,挂梯子会下载更快一点。也可以使用homebrew国内安装源不需要梯子。
参考:
- https://blog.youkuaiyun.com/txl910514/article/details/105880125
- https://blog.youkuaiyun.com/lxh_worldpeace/article/details/105464348?utm_medium=distribute.pc_relevant.none-task-blog-2defaultbaidujs_baidulandingword~default-0.highlightwordscore&spm=1001.2101.3001.4242.1
本文介绍了如何修复在安装homebrew时遇到的连接raw.githubusercontent.com失败的问题,步骤包括修改hosts文件、添加国内源并提供可能需要梯子的建议。
3455

被折叠的 条评论
为什么被折叠?



