CentOS 6.7 yum repository error

    YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
     Eg. Invalid release/repo/arch combination/
    removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

 

원인:

CentOS 6.7 EOL 만료로 Fastmirror 사이트에서 CentOS 6가 제거 되어 발생.

CentOS 버전별 EOL: https://wiki.centos.org/About/Product

 

About/Product - CentOS Wiki

About/Product (2021-07-14 19:53:40에 CarlGeorge가(이) 마지막으로 수정)

wiki.centos.org

 

해결 방법:

$ sed -i -e "s/^mirrorlist=http:\/\/mirrorlist.centos.org/#mirrorlist=http:\/\/mirrorlist.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo
$ sed -i -e "s/^#baseurl=http:\/\/mirror.centos.org/baseurl=https:\/\/vault.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo