2021年CentOS6停止更新支持后yum源失效解决办法

2021年 centos官网和阿里云之类的源把 centos 7之前的都给删除了。以下方法解决

wget -O /etc/yum.repos.d/CentOS-Base.repo http://file.kangle.odata.cc/repo/Centos-6.repo

wget -O /etc/yum.repos.d/epel.repo http://file.kangle.odata.cc/repo/epel-6.repo

yum clean all

yum makecache

Centos 6无法使用yum的解决方法_提示Error: Cannot find a valid baseurl for repo: base

推荐下面命令:

           

sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo
yum clean all
yum makecache
  
原文地址:https://www.cnblogs.com/pythonSF/p/14247945.html