curl: (6) Could not resolve host: github-releases.githubusercontent.com; 未知的错误解决办法

起因

下载安装docker-compose出现的报错

解决办法

1.打开终端,输入:ping github-releases.githubusercontent.com

PING github-releases.githubusercontent.com (185.199.108.154): 56 data bytes
64 bytes from 185.199.108.154: icmp_seq=0 ttl=49 time=83.342 ms
64 bytes from 185.199.108.154: icmp_seq=1 ttl=49 time=77.046 ms
64 bytes from 185.199.108.154: icmp_seq=2 ttl=49 time=92.115 ms
64 bytes from 185.199.108.154: icmp_seq=3 ttl=49 time=82.843 ms
64 bytes from 185.199.108.154: icmp_seq=4 ttl=49 time=70.732 ms
64 bytes from 185.199.108.154: icmp_seq=5 ttl=49 time=74.875 ms
64 bytes from 185.199.108.154: icmp_seq=6 ttl=49 time=83.088 ms

2.直接修改/etc/hosts文件,windows系统应该也一样,直接修改host文件b保存即可。

如遇到could not resolve host: github.com等问题都可用此方法解决

上一篇:sbt reference manual中Mapping Files里的示例代码在windows平台运行出错的修改


下一篇:Word章节自动编号+公式编号