Centos6 yum使用国内源 报404错的解决方法

落日映苍穹つ 2022-10-09 12:23 227阅读 0赞

Centos6 yum使用国内源 报404错的解决方法

今天在修改yum的安装源,
使用yum makecache的时候
一直报如下的错:
无论阿里,还是163的:

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”
尝试其他镜像。
To address this issue please refer to the below knowledge base article

原因是:
Centos6停止维护更新日期:2020年11月30日
Centos7停止维护更新日期:2024年6月
Centos8停止维护更新日期:2029年5月
2020年12月2日, centos官方停止了对 centos6的所有更新,并且下架了包括官方所有的 centos6源,目
前阿里、163、清华等 centos6源已无法使用

目前 vault.centos.org的源还可以用。修改如下:
备份 /etc/yum.repos.d/CentOS-Base.repo

修改 /etc/yum.repos.d/CentOS-Base.repo 内容为:
[centos-office]
name=centos-office
failovermethod=priority
baseurl=https://vault.centos.org/6.10/os/x86\_64/
gpgcheck=1
gpgkey=https://vault.centos.org/6.10/os/x86\_64/RPM-GPG-KEY-CentOS-6

清空、生成缓存:执行
yum clean all
yum makecache

解决问题的好文章!

发表评论

表情:
评论列表 (有 0 条评论,227人围观)

还没有评论,来说两句吧...

相关阅读

    相关 Centos配置国内yum

    网易(163)yum源是国内最好的yum源之一 ,无论是速度还是软件版本,都非常的不错,将yum源设置为163yum,可以提升软件包安装和更新的速度,同时避免一些常见软件版本

    相关 Centos配置国内yum

    网易(163)yum源是国内最好的yum源之一 ,无论是速度还是软件版本,都非常的不错,将yum源设置为163yum,可以提升软件包安装和更新的速度,同时避免一些常见软件版本