错误集:[Errno 12] Timeout on https://download.docker.com/linux/centos/7/x86_64/stable/repodata/ea7a

报错:[Errno 12] Timeout on https://download.docker.com/linux/centos/7/x86_64/stable/repodata/ea7a

报错情况:

[root@localhost yum.repos.d]#yum install -y docker-ce
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.njupt.edu.cn
 * updates: mirrors.njupt.edu.cn
docker-ce-stable/7/x86_64/prim FAILED                                          
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/ea7a69768bb34e3669908d94dc2c3dd2ecb41ccaab69cbbfe67e4b5c5d2bec0c-primary.sqlite.bz2: [Errno 12] Timeout on https://download.docker.com/linux/centos/7/x86_64/stable/repodata/ea7a69768bb34e3669908d94dc2c3dd2ecb41ccaab69cbbfe67e4b5c5d2bec0c-primary.sqlite.bz2: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
正在尝试其它镜像。

在这里插入图片描述

原因分析及解决方法:

我们在更新yum源或者出现配置yum源之后,通常都会使用yum makecache 生成缓存

yum makecache fast

这个命令是将软件包信息提前在本地缓存一份,用来提高搜索安装软件的速度
我们用这个命令生成缓存后再次安装

yum -y install docker-ce

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_35456705/article/details/115179240