Bài viết này, hướng dẫn Quý khách fix lỗi Failed to download metadata for repo ‘AppStream’ [CentOS] trong quá trình sử dụng yum
![Xử lý lỗi khi yum trên CentOS 8 – Failed to download metadata for repo ‘AppStream’ [CentOS] 3 Xử lý lỗi khi yum trên CentOS 8](https://i0.wp.com/wiki.minhduy.vn/wp-content/uploads/2023/08/xu-ly-loi-khi-yum-tren-centos-8-failed-to-download-metadata-for-repo-appstream-centos-3927.jpg?resize=748%2C502&ssl=1)
[root@minhduy ~]# yum update
CentOS-8 – AppStream 70 B/s | 38 B 00:00
Error: Failed to download metadata for repo ‘AppStream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist
Bước 1: Đi tới thư mục /etc/yum.repos.d/
[root@minhduy ~]# cd /etc/yum.repos.d/
Bước 2: Thực hiện command sau để điều chỉnh file cấu hình
[root@pavietnamcom ~]# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
[root@pavietnamcom ~]# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
Bước 3: Thực hiện thao tác yum update
[root@minhduy ~]# yum update -y
Chúc Quý khách thành công
![Xử lý lỗi khi yum trên CentOS 8 – Failed to download metadata for repo ‘AppStream’ [CentOS] 2 xu ly loi khi yum tren centos 8 failed to download metadata for repo appstream centos 3927 1](https://i0.wp.com/wiki.minhduy.vn/wp-content/uploads/2023/08/xu-ly-loi-khi-yum-tren-centos-8-failed-to-download-metadata-for-repo-appstream-centos-3927-1.jpg?resize=750%2C375&ssl=1)












