CentOS

How to Enable CentOS 8 EPEL

EPEL or Extra Packages for Enterprise Linux is a free, open-source community-driven repository project created by Fedora Linux for major Linux distributions. The EPEL project provides high-quality add-ons and software packages for Linux distributions, including those in the REHL family such as CentOS, RedHat, etc.

This guide will show you how to install and enable the EPEL repository and access its packages in CentOS 8.x.

Requirements

For this guide, you will require the following:

  • REHL/CentOS
  • Sudo or root privileges

How to Install EPEL Repository on CentOS 8

Installing the EPEL repository on CentOS is very simple. Follow the steps illustrated below:

Step 1: Start by searching the EPEL repository as shown in the command below:

sudo dnf search epel

The above command will give a sample output as shown below:

[centos@centos8 ~]$ sudo dnf search epel
Last metadata expiration check: 8:50:41 ago on Sun 16 May 2021 04:12:01 AM IST.
============================== Name Matched: epel ==============================
epel-release.noarch : Extra Packages for Enterprise Linux repository
                    : configuration
[centos@centos8 ~]$ clear
 
[centos@centos8 ~]$ sudo dnf search epel
Last metadata expiration check: 8:50:47 ago on Sun 16 May 2021 04:12:01 AM IST.
============================================================================================================================== Name Matched: epel ==============================================================================================================================
epel-release.noarch : Extra Packages for Enterprise Linux repository configuration

You can get more information about the package by using the command:

sudo dnf info epel-release

This will give you an output as shown below:

[centos@centos8 ~]$ sudo dnf info epel-release
Last metadata expiration check: 20:13:32 ago on Sun 16 May 2021 04:12:01 AM IST.
Available Packages
Name         : epel-release
Version      : 8
Release      : 8.el8
Architecture : noarch
Size         : 23 k
Source       : epel-release-8-8.el8.src.rpm
Repository   : extras
Summary      : Extra Packages for Enterprise Linux repository configuration
URL          : http://download.fedoraproject.org/pub/epel
License      : GPLv2
Description  : This package contains the Extra Packages for Enterprise Linux (EPEL) repository
             : GPG key as well as configuration for yum.

To install the epel-releases packages on CentOS 8, call the package manager as shown in the command below:

sudo dnf install epel-release

This will install the EPEL packages as shown in the image below:

How to Verify EPEL Repository

To confirm the EPEL repositories are enabled and installed on your system, you can use the commands:

sudo dnf update
sudo dnf repolist

This will list all the available repositories, including EPEL, as shown in the screenshot below:

Search and Install Package in EPEL

To install a software package provided in the EPEL repository, use the command as:

sudo dnf --enablerepo="epel" install <package_name>

To view the list of packages in the EPEL repository, use the command:

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

This will list all the available packages in the EPEL repository, as shown below.

To locate a specific package in the EPEL repository, simply pass the output to grep as shown (searches for qbittorrent package)

sudo dnf --disablerepo="*" --enablerepo="epel" list available | grep qbittorrent

The output is as shown below

Conclusion

In this tutorial, you learned how to enable and install the EPEL repository on CentOS 8. Feel free to try the process as illustrated in the tutorial and see if it is helpful to your needs.

About the author

John Otieno

My name is John and am a fellow geek like you. I am passionate about all things computers from Hardware, Operating systems to Programming. My dream is to share my knowledge with the world and help out fellow geeks. Follow my content by subscribing to LinuxHint mailing list