Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • VirtualBox
  • VMware
  • Windows
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • VirtualBox
  • VMware
  • Windows
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

Errors During Downloading Metadata for Repository Appstream

May 1, 2023
in Blog, Linux
0
ADVERTISEMENT

Table of Contents

Errors During Downloading Metadata for Repository Appstream

In this post, we will take you through the steps to solve Failed to download metadata for repo AppStream error which I was getting in a CentOS 8 Server.

This problem can be encountered in any of the CentOS 8 system which is still in use post December 31st, 2021. The reason is because CentOS 8 had already reached its End of Life (EOL) on this date which means that it will no longer receive any development updates from official CentOS Project.

But if you are still thinking to use or already using this OS after Dec 31st, 2021 due to any reason then you need to change the mirror to Vault where it will be archived permanently like it happened for other older CentOS versions.

[bonben@centos8 ~]$ sudo dnf update -y
CentOS Linux 8 - AppStream                                                                           26 kB/s | 8.1 kB     00:00
Errors during downloading metadata for repository 'appstream':
  - Status code: 404 for http://mirror.centos.org/centos/8/AppStream/x86_64/os/repodata/repomd.xml (IP: 204.15.73.245)
Error: Failed to download metadata for repo 'appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
CentOS Linux 8 - BaseOS                                                                              41 kB/s | 8.1 kB     00:00
Errors during downloading metadata for repository 'baseos':
  - Status code: 404 for http://mirror.centos.org/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 69.4.80.162)
Error: Failed to download metadata for repo 'baseos': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Ignoring repositories: appstream, baseos 

To fix the above error, we need to change the repo URL pointing from official CentOS URL to vault.centos.org using below commands.

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-*
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-*

Alternatively, you can also point to the Cloudflare-based vault repository, by running the following commands:

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

Once the mirror is changed and updated, we can now try to update again by using dnf update or yum update command as shown below. This time it works fine as expected.

[root@centos8 ~]# yum update -y
CentOS-8 - AppStream                                                                     28 MB/s | 8.4 MB     00:00
CentOS-8 - Base                                                                          13 MB/s | 4.6 MB     00:00
CentOS-8 - Extras                                                                       165 kB/s |  10 kB     00:00
CentOS-8 - PowerTools                                                                   5.3 MB/s | 2.3 MB     00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64                                   13 kB/s | 9.6 kB     00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64                                   23 kB/s | 733 kB     00:32
Extra Packages for Enterprise Linux 8 - x86_64                                          8.3 kB/s | 9.1 kB     00:01
Extra Packages for Enterprise Linux 8 - x86_64                                          808 kB/s |  13 MB     00:16
Dependencies resolved.
========================================================================================================================
 Package                             Architecture Version                                        Repository        Size
========================================================================================================================
Installing:
 centos-linux-release                noarch       8.5-1.2111.el8                                 BaseOS            22 k
     replacing  centos-release.x86_64 8.2-2.2004.0.1.el8
     replacing  centos-repos.x86_64 8.2-2.2004.0.1.el8
 kernel                              x86_64       4.18.0-348.7.1.el8_5                           BaseOS           7.0 M
 kernel-core                         x86_64       4.18.0-348.7.1.el8_5                           BaseOS            38 M
 kernel-modules                      x86_64       4.18.0-348.7.1.el8_5                           BaseOS            30 M
5/5 - (1 vote)
Previous Post

How to Install CyberPanel on Centos 8 Linux

Next Post

Errors During Downloading Metadata for Repository Baseos

Related Posts

Ftr21

AzureAD, MSOnline, AzureADPreview and Microsoft Graph API with PowerShell Comparisons

September 23, 2023
Ftr21

How to Cleanup Microsoft.Graph PowerShell Modules in Windows

September 22, 2023
Ftr21

How to Fix Get-MgUser One or More Errors Occurred

September 22, 2023
Ftr38

How to Remove NuGet Package Provider Using PowerShell

September 20, 2023
Ftr21

Automatically Installs Microsoft Graph PowerShell Module if not Installed Already When Run a Script

September 21, 2023
Ftr5

How to Reinstall Microsoft Store in Windows after Uninstalling it with PowerShell

September 17, 2023

Leave a Reply Cancel reply

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

Recent Posts

  • AzureAD, MSOnline, AzureADPreview and Microsoft Graph API with PowerShell Comparisons
  • How to Cleanup Microsoft.Graph PowerShell Modules in Windows
  • How to Fix Get-MgUser One or More Errors Occurred

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Socials

Twitter

Telegram

YouTube

Discord

Copyright 2023 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory