CentOS6.5替换yun源及yum源无法使用问题
使用yum makecache的时候,报错如下:
http://mirrors.163.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
原因是:
Centos6停止维护更新日期:2020年11月30日
Centos7停止维护更新日期:2024年6月
Centos8停止维护更新日期:2029年5月
2020年12月2日, centos官方停止了对 centos6的所有更新,并且下架了包括官方所有的 centos6源,目
前阿里、163、清华等 centos6源已无法使用
# 执行命令确定操作系统
lsb_release -a
## 输出
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.5 (Final)
Release: 6.5
Codename: Final
# 第一步
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.bak
# 第三步 拉取镜像
curl -o /etc/yum.repos.d/CentOS-Base.repo http://file.kangle.odata.cc/repo/Centos-6.repo
curl -o /etc/yum.repos.d/epel.repo http://file.kangle.odata.cc/repo/epel-6.repo
# 第四步 清除缓存 及 重新缓存
yum clean all && yum makecache