Error: Failed to download metadata for repo 'appstream'

Hi,

Using dnf today I got:

Error: Failed to download metadata for repo ‘appstream’: repomd.xml parser error: Parse error at line: 1 (xmlParseStartTag: invalid element name
)

I searched for this issue and tried several things including:

sudo dnf clean all
sudo rm -r /var/cache/dnf
sudo dnf upgrade

as suggested at:

But I still get the same error.

Any help is much appreciated.

Hi

Maybe a broken mirror.

Can you check the content of the downloaded repomd.xml file: /var/cache/dnf/appstream-*/repodata/repomd.xml

Compare with: http://dl.rockylinux.org/pub/rocky/8.6/AppStream/x86_64/os/repodata/repomd.xml

Check in /var/log/dnf.librepo.log where AppStream repomd.xml was downloaded from:
grep AppStream /var/log/dnf.librepo.log | grep repomd.xml | tail -1

1 Like

@olista
Thanks for responding to my post and your help.
As you mention it was likely a broken mirror, because this morning dnf is working again.