Error updating metadata for rocky linux 9.4

Hi Support,
Hi, i bumped into this error. i did the dnf clean all and dnf update -y. the error will still pops up.

Why are you trying to use a rhel 7 repository on Rocky Linux 9? Not only is RHEL 7 end of life, you’re trying to use a repository for it (that is likely gone now) on Rocky Linux 9.

Disable the repository or find one that matches your system (rhel 9).

how do i do that and point to rhel9?

You should find and remove the repository located in /etc/yum.repos.d/.
Afterwards import the new repo and the gpg key and verify by listing your repos.

[root@localhost ~]# wget -O /etc/yum.repos.d/microsoft-prod.repo https://packages.microsoft.com/config/rhel/9/prod.repo
[root@localhost ~]# rpm --import https://packages.microsoft.com/keys/microsoft.asc
[root@localhost ~]# dnf repolist
repo id                                                                             repo name
appstream                                                                           Rocky Linux 9 - AppStream
baseos                                                                              Rocky Linux 9 - BaseOS
crb                                                                                 Rocky Linux 9 - CRB
epel                                                                                Extra Packages for Enterprise Linux 9 - x86_64
epel-cisco-openh264                                                                 Extra Packages for Enterprise Linux 9 openh264 (From Cisco) - x86_64
extras                                                                              Rocky Linux 9 - Extras
packages-microsoft-com-prod                                                         packages-microsoft-com-prod

You can browse through available repos by opening Index of / (microsoft.com) in your browser.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.