brew 安装失败
问题描述:
在curl 的时候就会报超时问题,报错如下
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
解决方法1:
- 打开https://www.ipaddress.com/
- 查询 raw.githubusercontent.com 对应的ip地址
- 修改 hosts 文件,输入如下命令
sudo vim /etc/hosts
- 在hosts文件中添加
#githubhomebrew 查到的ip地址 raw.githubusercontent.com
- 然后执行
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
此文章转载自 测试人社区,仅此记录!