How To Enable EPEL Repository On Rocky Linux 8 / CentOS 8 / RHEL 8

0
Enable EPEL Repository On Rocky Linux 8
Enable EPEL Repository On Rocky Linux 8

Extra Packages for Enterprise Linux (EPEL) is a package repository that provides additional packages that are not included in standard Rocky Linux / RHEL / CentOS repositories.

Fedora community maintains the EPEL repository.

This guide helps you how to enable EPEL repository on Rocky Linux 8 / CentOS 8 / RHEL 8.

THIS DOCUMENT IS ALSO AVAILABLE FOR

Enable EPEL Repository

The EPEL repository can be enabled by installing EPEL repository configuration rpm.

Rocky Linux 8 / CentOS 8

dnf install -y epel-release

The output will look like below

Last metadata expiration check: 0:17:48 ago on Sat 26 Jun 2021 05:46:56 AM UTC.

Dependencies resolved.
===================================================================================================================
 Package                        Arch                     Version                    Repository                Size
===================================================================================================================
Installing:
 epel-release                   noarch                   8-10.el8                    extras                    22 k

Transaction Summary
===================================================================================================================
Install  1 Package

Total download size: 22 k
Installed size: 30 k
Downloading Packages:
epel-release-8-10.el8.noarch.rpm                                                    195 kB/s |  22 kB     00:00    
-------------------------------------------------------------------------------------------------------------------
Total                                                                               16 kB/s |  22 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                           1/1 
  Installing       : epel-release-8-10.el8.noarch                                                               1/1 
  Running scriptlet: epel-release-8-10.el8.noarch                                                               1/1 
  Verifying        : epel-release-8-10.el8.noarch                                                               1/1 

Installed:
  epel-release-8-10.el8.noarch                                                                                      

Complete!

Additionally, enable the PowerTools repository since EPEL packages may depend on packages from it.

dnf config-manager --set-enabled PowerTools

RHEL 8

dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

The output will look like below

Last metadata expiration check: 0:17:48 ago on Sat 26 Jun 2021 05:46:56 AM UTC.
epel-release-latest-8.noarch.rpm                                                    15 kB/s |  21 kB     00:01    
Dependencies resolved.
===================================================================================================================
 Package                      Arch                   Version                    Repository                    Size
===================================================================================================================
Installing:
 epel-release                 noarch                 8-10.el8                    @commandline                  21 k

Transaction Summary
===================================================================================================================
Install  1 Package

Total size: 21 k
Installed size: 30 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                           1/1 
  Installing       : epel-release-8-10.el8.noarch                                                               1/1 
  Running scriptlet: epel-release-8-10.el8.noarch                                                               1/1 
  Verifying        : epel-release-8-10.el8.noarch                                                               1/1 

Installed:
  epel-release-8-10.el8.noarch                                                                                      

Complete!

Additionally, enable Code ready builder repository on RHEL 8 since EPEL packages may depend on packages from it.

ARCH=$( /bin/arch )

subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"

List Repositories

You can find the EPEL repository in the list.

dnf repolist

The output will look like below

repo id                                                          repo name
appstream                                                        Rocky Linux 8 - AppStream
baseos                                                           Rocky Linux 8 - BaseOS
docker-ce-stable                                                 Docker CE Stable - x86_64
epel                                                             Extra Packages for Enterprise Linux 8 - x86_64
epel-modular                                                     Extra Packages for Enterprise Linux Modular 8 - x86_64
extras                                                           Rocky Linux 8 - Extras

List Available Packages On EPEL repository

dnf list available --disablerepo=* --enablerepo=epel

The packages list will look like below.

.     .     .
.     .     .

zork.x86_64                                                                                1.0.3-1.el8                                                              epel
zsh-syntax-highlighting.noarch                                                             0.7.1-1.el8                                                              epel
zswap-cli.x86_64                                                                           0.5.0-1.el8                                                              epel
zvbi.x86_64                                                                                0.2.35-9.el8                                                             epel
zvbi-devel.x86_64                                                                          0.2.35-9.el8                                                             epel
zvbi-fonts.noarch                                                                          0.2.35-9.el8                                                             epel

Search Packages On EPE Repository

You can use the search or list option with the dnf command to find packages.

dnf search xrdp

OR

dnf list xrdp

Output:

Available Packages
xrdp.x86_64                                                                     1:0.9.16-1.el8                                                                      epel

Install Packages from EPEL Repository

Installing a package from the EPEL repository is a straightforward one. Use the dnf command to install a package.

dnf install xrdp

Conclusion

That’s All. I hoper you have learned how to enable EPEL repository on Rocky Linux 8 / CentOS 8 / RHEL 8. Please share your feedback in the comments section.

You might also like