If you remove all the files in /etc/yum.repos.d you may see this error.
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile There are no enabled repos. Run "yum repolist all" to see the repos you have. To enable Red Hat Subscription Management repositories: subscription-manager repos --enableTo enable custom repositories: yum-config-manager --enable
I’ll show you How to rebuild /etc/yum.repos.d in CentOS
to solve this, you can check your version of CentOS to update the mirror
[[email protected] ~]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core)
or you can install redhat-lsb-core with command or find rpm package
yum install redhat-lsb-core
I recommend to backup your repository before change your repo
cp -ax /etc/yum.repos.d/* /root/backupMyrepo
and repair your repo with simple bash script
cheers!