谬误:为 repo ‘base’ 下载元数据失败
解决办法:
大家能够依照如下流程批改源
1.备份现有源
mv /etc/yum.repos.d /etc/yum.repos.d.backup
2.设置新的yum目录
mkdir /etc/yum.repos.d
3.装置wget(我没装置,也没事,可能是我以前装置过)
yum install -y wget
4.就是坑了我一早晨的下载配置(大家肯定要辨别本人的零碎版本,不然必定不通过)
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
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
5.革除文件并重建元数据缓存
yum clean all yum makecache
6.最初更新软件包,这一步要下载安装或降级软件包,比拟费时间!
yum update -y