Posts / [Centos 8] Failed to download metadata for repo 'appstream'
[Centos 8] Failed to download metadata for repo 'appstream'
1. 에러
shell
Failed to set locale, defaulting to C.UTF-8
CentOS Linux 8 - AppStream
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
centos 8 버전에서 `yum update` 실행 시 위와같은 에러 문구가 나오게 되는데
이는 centos 8 지원이 2021년 말에 종료가 되어서 Mirror site 가 __vault__ 로 전환되어 Mirror site 를 못 찾아 발생되는 문제이다.
2. 해결방법
때문에 Mirror site 를 __vault__ 로 전환해주어야 한다
shell
$ sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
$ sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*
하지만 Centos 8 버전이 지원 종료되었기 때문에 위와같은 방법은 임시방편에 불과하다. 때문에 Centos Stream 으로 업그레이드를 해줄 필요가 있다.
[Centos 8 을 Centos Stream으로 마이그레이션 하는 방법](https://velog.io/@juhwannn/Centos-Centos-8-%EC%9D%84-Centos-Stream%EC%9C%BC%EB%A1%9C-%EB%A7%88%EC%9D%B4%EA%B7%B8%EB%A0%88%EC%9D%B4%EC%85%98-%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95)
\*추가로 Centos 7 버전은 2024년까지 지원된다.