On CentOS8.x End of life , then if you running "yum update" will found error
Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist
So how to fixed
==change mirrorlist ==
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*
== install centos-release-stream
sudo dnf install centos-release-stream -y
sudo dnf swap centos-{linux,stream}-repos -y
sudo dnf distro-sync -y
yum update
==finished ==
Special Thank:
https://flutterq.com/failed-to-download-metadata-for-repo-appstream-cannot-prepare-internal-mirrorlist-no-urls-in-mirrorlist/