安装docker过程中因为设置阿里云镜像报错

错误:为 repo ‘mirrors.aliyun.com_do’ 下载元数据失败 : Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

解决方案:

​ 1、设置新的yum目录

mkdir /etc/yum.repos.d

​ 2、 下载配置(要区分自己的系统版本,不然肯定不通过)

CentOS 7

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

​CentOS 8

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo

3、清除文件并重建元数据缓存
yum clean all
yum makecache
​ 4、最后更新软件包
​ 自己选upgraede或者update
yum -y update (升级所有包同时也升级软件和系统内核)
yum -y upgrade (只升级所有包,不升级软件和系统内核 )

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐