Home » Xử lý lỗi khi yum trên CentOS 8 – Failed to download metadata for repo ‘AppStream’ [CentOS]

Xử lý lỗi khi yum trên CentOS 8 – Failed to download metadata for repo ‘AppStream’ [CentOS]

by tuanlp

💡 Xử lý lỗi khi yum trên CentOS 8 AppStream

Fix lỗi Failed to download metadata for repo ‘AppStream’ [CentOS] trong quá trình sử dụng yum

[root@pavietnamcom ~]# 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@pavietnamcom ~]# 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@pavietnamcom ~]# yum update -y

You may also like