CentOS 8 yum 설치 시 No URLs in mirrorlist 해결 방법

CentOS 8에서 오류

> dnf install tree

Repository AppStream is listed more than once in the configuration

Repository BaseOS is listed more than once in the configuration

Repository extras is listed more than once in the configuration

CentOS-8 - AppStream     83  B/s |  38  B     00:00    

오류: Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

 

 

 

아래 코드로 해결됨

> sudo sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*

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