mac安装homebrew

1.安装连接

按照下面链接安装
https://brew.sh/

2.百分之99会报错
curl: (7) Failed to connect to raw.githubusercontent.com port 443 after 17 ms: Connection refused

3.参考下面链接解决

https://github.com/hawtim/hawtim.github.io/issues/10

上面链接的精华:
在本机的 host 文件中添加,建议使用 switchhosts 方便 host 管理

安装switchhosts
https://github.com/oldj/SwitchHosts/releases

199.232.68.133 raw.githubusercontent.com
199.232.68.133 user-images.githubusercontent.com
199.232.68.133 avatars2.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com

记得保存后打开新增的配置
image

添加以上几条 host 配置,页面的图片展示就正常了,homebrew 也能装了,nvm 也行动灵活了。

4.再次按照第1步去安装

posted @ 2022-09-17 19:31  zong涵  阅读(86)  评论(0编辑  收藏  举报