起因

下载安装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等问题都可用此方法解决

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐