Mirrorlist error while downloading any packages on rocky 8.7

Hi Team,

I am trying to install some packages on rocky 8.7 but due to mirrorlist error it is not working. I have tried commenting mirrorlist url in repo and uncommented baseurl but that also did not work.

Rocky Linux 8 - AppStream 0.0 B/s | 0 B 02:04
Errors during downloading metadata for repository ‘appstream’:

Can anyone please suggest me the workaround for this?

First, 8.7 is no more, since it’s been moved to the vault. The version now is 8.8.

What’s the contents of your /etc/yum.repos.d/Rocky-Appstream.repo file? It should look 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

If you are using baseurl, then it would be recommended to use the mirrorlist option (as above config) to choose mirrors closer to your location, rather than overload the main Rocky servers - which could be restricted some time in the future to use by Tier 1 mirrors only (if it hasn’t already).

Hi @iwalker , I have tried with mirrorlist and baseurl both but none worked.
Earlier with the above configuration it was working fine.
But now it is not working , is there any thing that can fix this?

Try reverting to mirrorlist and then:

dnf clean all

After this try to update or install packages

Out of curiosity, do you have CRB repo enabled? If yes, disable it and try again.