在mac上用homebrew安装python3.6,结果报错如下:curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

mac:brew无法访问raw.githubusercontent.com解决方式_第1张图片

 

 我试了下ping raw.githubusercontent.com,确实不通,在网上搜素访问方式,终于找到了一篇文章:https://www.cnblogs.com/sinferwu/p/12726833.html

参照解决方法如下:

1. 查询raw.githubusercontent.com对应的dns

输入:https://site.ip138.com/raw.Githubusercontent.com/

mac:brew无法访问raw.githubusercontent.com解决方式_第2张图片

 

2. 修改hosts

在mac的终端下执行:

sudo echo "151.101.76.133 raw.githubusercontent.com" >> /etc/hosts

 

 3. 试试效果

mac:brew无法访问raw.githubusercontent.com解决方式_第3张图片

 

博主:测试生财

座右铭:通过测试生涯完成原始积累,通过投资奔向财务自由

csdn:https://blog.csdn.net/ccgshigao

博客园:https://www.cnblogs.com/qa-freeroad/

51cto:https://blog.51cto.com/14900374