How do I enable EPEL repository on RHEL 8 / CentOS 8 Linux?. EPEL is a repository that provides extra packages for Enterprise Linux. The Fedora EPEL group is responsible for creating and maintaining a high-quality set of additional packages for RHEL, CentOS, Scientific Linux, and Oracle Linux.
RHEL, CentOS, Scientific Linux, and Oracle Linux distributions are designed for performance and stability with a limited number of packages in their Base repositories. If you’re a Developer, there are high chances some of the packages you need are not available. EPEL repository bridge this gap by providing additional stable packages that work for most use cases.
See How to Install CentOS 8 Linux
Install EPEL Repository on RHEL / CentOS 8
EPEL 8 has been released officially to the general public. Installation of EPEL repository is so easy as this is done by running the following command.
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
This will download the repository file to /etc/yum.repos.d/epel.repo
and enables it. Here is the installation output.
...
Transaction Summary
============================================================================================================
Install 1 Package
Total size: 21 k
Installed size: 30 k
Is this ok [y/N]: y
For CentOS 8
On CentOS 8 it is recommended to also enable the PowerTools repository since EPEL packages may depend on packages from it:
sudo dnf config-manager --set-enabled powertools
For RHEL 8
- on RHEL 8 it is required to also enable the codeready-builder-for-rhel-8-*-rpms repository since EPEL packages may depend on packages from it:
ARCH=$( /bin/arch )
sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"
Confirm EPEL installation on CentOS 8 / RHEL 8
You can confirm EPEL repository addition and functionality by running the following command.
$ sudo dnf repolist epel
repo id repo name status
epel Extra Packages for Enterprise Linux 8 - x86_64 enabled
List packages available on EPEL repository.
sudo dnf --disablerepo="*" --enablerepo="epel" list available
You can filter further to check if the required package is available on EPEL repository.
sudo dnf --disablerepo="*" --enablerepo="epel" list available | grep <package>
Example:
$ sudo dnf --disablerepo="*" --enablerepo="epel" list available | grep chromium
chromium.x86_64 112.0.5615.165-1.el8 epel
chromium-common.x86_64 112.0.5615.165-1.el8 epel
chromium-headless.x86_64 112.0.5615.165-1.el8 epel
To install package from EPEL repository, just run
sudo dnf --enablerepo="epel" install <package>
Example:
sudo dnf --enablerepo="epel" install chromium
Some dependencies may be installed from the Base repositories. There you have it, you can install your favorite packages from the EPEL repository. As of this writing, there are packages available on EPEL 7 repository but not yet on EPEL 8, you may need to be patient as more packages are added daily.
Conclusion
You have seen how easy it is to enable the EPEL 8 repository on CentOS 8 / RHEL 8 Linux system. We used an installer that automatically created a .repo file under /etc/yum.repos.d directory. You can disable the repository at any time by turning off the enabled flag.
Also check How to enable REMI repository on CentOS/RHEL 8
Other interesting guides: