Centos 6 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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章