执行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.csdn.net/txl910514/article/details/105880125
- https://blog.csdn.net/lxh_worldpeace/article/details/105464348?utm_medium=distribute.pc_relevant.none-task-blog-2defaultbaidujs_baidulandingword~default-0.highlightwordscore&spm=1001.2101.3001.4242.1