Linux

yum cannot prepare internal mirrorlist no urls in mirrorlist

Naan 2023. 1. 18. 00:01
반응형

# yum install update
Repository extras is listed more than once in the configuration
CentOS Linux 8 - AppStream                                                                                                                                 50  B/s |  38  B     00:00
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

yum 설치 하면 위와 같이 에러가 발생 할때가 있다.

서비스 종료로 repo 경로가 변경된 경우가 그렇다. 

이럴때는 repo 경로에 있는 파일을 수정 해주면 된다.

sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-Linux-*
sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-Linux-*

위와 같이 해서 CentOS 파일을 수정 해주면 된다.

혹 정상 적용이 안된다면 yum.repos.d 폴더 파일 이름으 달라서 그렇다 이름을 보고 변경해주자.

정상적으로 yum 이 작동 된다.

반응형