How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

I tried to update some extensions by use yum on centOs which I specified in Dockerfile. After pulling centOs image the run crushed and throw this error!? And i have found out the way to fix that error. Let’s see how to fix error Failed to download metadata for repo ‘appstream’ on Centos 8 with this guide:

Step 1. Go to /etc/yum.repos.d/ directory:

[root@howvpscom ~]# cd /etc/yum.repos.d/

Step 2. Change some configs:

[root@howvpscom ~]# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
[root@howvpscom ~]# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

Step 3. Update our system:

[root@howvpscom ~]# yum update -y

Now, error on my VPS have fixed. Good luck to you. Lets me know your results.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *