yum repolist #查看yum源信息
yum -y install name #安装软件
yum clean all #清空缓存
yum makecache #进行缓存
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup #老的备份
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo #下载
问题 更换yum源 yum makecache报错:
类似于这种的 ,如果#注释https,或者更改版本号都无法解决的话,去备份/etc/yum.repos.d 然后删掉除了Centos-Base.repo之外所有文件