Docker容器

centos8或者Anolis OS报centos8报错:Errors during downloading metadata for repository 'docker-ce-stabl

本文主要是介绍centos8或者Anolis OS报centos8报错:Errors during downloading metadata for repository 'docker-ce-stabl,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

具体错误信息,网上找了很多方法不管用

Docker CE Stable - x86_64                                                                                                                                                     185  B/s | 390  B     00:02
Errors during downloading metadata for repository 'docker-ce-stable':
  - Status code: 404 for https://download.docker.com/linux/centos/8-stream/x86_64/stable/repodata/repomd.xml (IP: 13.224.250.78)
错误:Failed to download metadata for repo 'docker-ce-stable': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

 

后来查询 https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.133c1b11VxFWZH

是因为CentOS 8操作系统版本结束了生命周期(EOL),Linux社区已不再维护该操作系统版本。

 ,后找到解决方案如下

更换镜像为阿里云 以前镜像这样的

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo# 进入yum目录
cd /etc/yum.repos.d

# 删除目录下所有文件(注意完整复制,不要漏了那个点)
rm -rf ./*

# 安装正确的镜像源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

# 生成缓存
yum makecache

解决问题

 

这篇关于centos8或者Anolis OS报centos8报错:Errors during downloading metadata for repository 'docker-ce-stabl的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!