CentosYUM源報錯“Invalid release/repo/arch combination

記錄線上Centos6系統服務器,yum報錯問題

問題:
  • 線上6版本服務器突發yum執行報錯,“Invalid release/repo/arch combination/”

image-20201225151919549

處理過程:

由於Centos6已於今年11月停止支持,這是官方源站下的readme

This directory (and version of CentOS) is deprecated. Please see this FAQ
concerning the CentOS release scheme:

https://wiki.centos.org/FAQ/General

Please keep in mind that 6.0, 6.1, 6.2, 6.3, 6.4 , 6.5, 6.6, 6.7, 6.8 , 6.9 and 6.10 no longer get any updates, nor
any security fix's.
The whole CentOS 6 is *dead* and *shouldn't* be used anywhere at *all*

由於centos6停止支持,官方把源移到了https://vault.centos.org/6.8/下, 所以會報錯。

解決辦法:

原repo

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirrorlist.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

更改後:

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://vault.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

由於後續centos會變爲redhat的上游版本,後續可以支持Rocky Linux

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