IT기술/Linux

yum 오류 조치 방법

dobbby 2023. 5. 17. 20:43
반응형

CentOS 6 버전 업데이트 지원이 종료되면서 yum update 등 명령어 사용 시 오류가 발생

 

* 오류 내용 (32Bit, 64Bit)
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 find a valid baseurl for repo: base

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/i386/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base


* 해결 방법
각 OS Bit에 맞춰 3줄씩 명령어 입력 후 yum update 하면 정상 동작 완료

32Bit
echo "https://vault.centos.org/6.10/os/i386/" > /var/cache/yum/i386/6/base/mirrorlist.txt
echo "http://vault.centos.org/6.10/extras/i386/" > /var/cache/yum/i386/6/extras/mirrorlist.txt
echo "http://vault.centos.org/6.10/updates/i386/" > /var/cache/yum/i386/6/updates/mirrorlist.txt

64Bit
echo "https://vault.centos.org/6.10/os/x86_64/" > /var/cache/yum/x86_64/6/base/mirrorlist.txt
echo "http://vault.centos.org/6.10/extras/x86_64/" > /var/cache/yum/x86_64/6/extras/mirrorlist.txt
echo "http://vault.centos.org/6.10/updates/x86_64/" > /var/cache/yum/x86_64/6/updates/mirrorlist.txt

또는 아래와 같이 적용


CentOS 5 (32 bit)
"# echo ""http://vault.centos.org/5.11/os/i386/"" > /var/cache/yum/base/mirrorlist.txt
# echo ""http://vault.centos.org/5.11/extras/i386/"" > /var/cache/yum/extras/mirrorlist.txt
# echo ""http://vault.centos.org/5.11/updates/i386/"" > /var/cache/yum/updates/mirrorlist.txt"


CentOS 5 (64 bit)
"# echo ""http://vault.centos.org/5.11/os/x86_64/"" > /var/cache/yum/base/mirrorlist.txt
# echo ""http://vault.centos.org/5.11/extras/x86_64/"" > /var/cache/yum/extras/mirrorlist.txt
# echo ""http://vault.centos.org/5.11/updates/x86_64/"" > /var/cache/yum/updates/mirrorlist.txt"


CentOS 6 (32 bit)
"# echo ""https://vault.centos.org/6.10/os/i386/"" > /var/cache/yum/i386/6/base/mirrorlist.txt
# echo ""http://vault.centos.org/6.10/extras/i386/"" > /var/cache/yum/i386/6/extras/mirrorlist.txt
# echo ""http://vault.centos.org/6.10/updates/i386/"" > /var/cache/yum/i386/6/updates/mirrorlist.txt"


CentOS 6 (64 bit)
"# echo ""https://vault.centos.org/6.10/os/x86_64/"" > /var/cache/yum/x86_64/6/base/mirrorlist.txt
# echo ""http://vault.centos.org/6.10/extras/x86_64/"" > /var/cache/yum/x86_64/6/extras/mirrorlist.txt
# echo ""http://vault.centos.org/6.10/updates/x86_64/"" > /var/cache/yum/x86_64/6/updates/mirrorlist.txt"

반응형