Dnf update failed

I ran a dnf update on my Rocky Linux release 8.6 (Green Obsidian) and I get this error message
[root@localhost yum.repos.d]# dnf update
Rocky Linux 8 - AppStream 6.5 kB/s | 3.3 kB 00:00
Error: Failed to download metadata for repo ‘appstream’: repomd.xml parser error: Parse error at line: 1 (xmlParseStartTag: invalid element name
)
Can someone please help me out?

Hi, try:

dnf clean all
dnf update

and see if that helps, just in case it’s one of the mirrors playing up.

1 Like

I already tried those commands
[root@localhost yum.repos.d]# dnf clean all
9 files removed
[root@localhost yum.repos.d]# dnf update
Rocky Linux 8 - AppStream 7.4 kB/s | 3.3 kB 00:00
Error: Failed to download metadata for repo ‘appstream’: repomd.xml parser error: Parse error at line: 1 (xmlParseStartTag: invalid element name
)
That didn’t work.

  1. What is the architecture (uname -i)?

  2. Any change made in /etc/yum.repos.d or /etc/dnf/vars?

  3. Is a proxy used?

  4. Is /etc/yum.repos.d/Rocky-AppStream.repo looking like this?

[appstream]
name=Rocky Linux $releasever - AppStream
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=AppStream-$releasever
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/AppStream/$basearch/os/
gpgcheck=1
enabled=1
countme=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
  1. Any other file in /etc/yum.repos.d configuring an [appstream] repository?

  2. Is a file /var/cache/dnf/appstream-*/repodata/repomd.xml present?

  3. Does the content match with http://dl.rockylinux.org/pub/rocky/8.6/AppStream/x86_64/os/repodata/repomd.xml ?

1 Like

For me it was the 9s-tools.repo which pointed to an old Redhat version.
I changed it from 6 to 8 and it worked.
I used this one: http://repo.severalnines.com/s9s-tools/CentOS_8/s9s-tools.repo
Do you have your own repo for it?