epel is a very important package library which holds many frequently-used packages. It is very weird that epel is not usable on new-installed BandWagonHost CentOS 7 BBR host. This post introduces how to re-install epel
Let's build the testing environment with the following steps:
sudo yum install epel-release -y
install htop for example, we get the following message:
No package htop available
We could use the following command to check if epel is installed correctly:
yum repolist
epel should be listed if epel is installed correctly as the output below, but not on our new-installed host, so we have to re-install epel.
repo id repo name status
base/7/x86_64 CentOS-7 - Base 9,910+1
elrepo-kernel ELRepo.org Community Enterprise Linux Kernel Repository - el7 37
*epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 12,618
extras/7/x86_64 CentOS-7 - Extras 363
updates/7/x86_64 CentOS-7 - Updates 965+5
Re-install epel with the following commands:
sudo rpm -qa | grep epel # check the epel version installed
sudo rpm -e epel-release-x-x.noarch # remove the installed epel, x-x is the version
sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # install the latest epel
yum repolist # check if epel is installed
We could then install htop, if epel is listed.