Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

행복한 개구리

CentOS 8 - Failed to synchronize cache for repo 'AppStream', ignoring this repo. 해결 본문

Linux/문제 해결

CentOS 8 - Failed to synchronize cache for repo 'AppStream', ignoring this repo. 해결

HappyFrog 2023. 9. 4. 21:48

CentOS 8 설치 후 필요한 패키지 다운을 위해 커맨드를 사용했는데, 위 메시지가 떴다.

검색하다보니 저장소도 제대로 할당되어 작동중이었고 뭐가 문제인가 했더니 baseurl로 설정된 주소가 원인이었다.

 

CentOS 8은 더이상 CentOS Linux로 지원되지 않고 CentOS Stream으로 지원되도록 변경됐다. 따라서 기존의 baseurl로 지원되던 CentOS Linux용 url을 CentOS Stream용 url로 변경해줄 필요가 있다. 아마도 CentOS 8이 CentOS Linux로 유통되던 시절의 파일로 설치해서 발생한 문제로 보인다. 현재 CentOS 공식 홈페이지에서는 CentOS 8은 CentOS Stream으로만 지원하고 있다.

 

# dnf 캐시 초기화
dnf clear all			
rm -rf /var/cache/dnf	

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

# dnf 업데이트
dnf update

위 커맨드를 차례대로 입력하여 dnf캐시를 초기화하고 baseurl을 CentOS Linux(mirror)에서 CentOS Stream(vault)의 URL로 변경한 다음, dnf를 업데이트 해주면 된다. 

 

만약 위 커맨드가 정상적으로 작동하였고, 작업이 완료된 이후에 [ Error: Failed to download metadata for repo '저장소 이름': Cannot prepare internal mirrorlist: No URLs in mirrorlist ] 라고 하는 에러가 발생한다면 다음 게시물을 보고 해결해보자.

 

CentOS 8 - Error: Failed to download metadata for repo '저장소 이름': Cannot prepare internal mirrorlist: No URLs in mirrorlist 해결 (tistory.com)

 

CentOS 8 - Error: Failed to download metadata for repo '저장소 이름': Cannot prepare internal mirrorlist: No URLs in mirror

Error: Failed to download metadata for repo '저장소 이름': Cannot prepare internal mirrorlist: No URLs in mirrorlist 이라고 뜨며 에러가 난다면 메타데이터의 url 주소를 변경해주어야 한다. CentOS 8은 더이상 CentOS Linux를

bodong2.tistory.com