Quantcast

How to Install/Enable EPEL/EPEL Next on AlmaLinux 9

EPEL, which stands for Extra Packages for Enterprise Linux, is an open-source and free repository that provides extra packages for Enterprise Linux. The EPEL repository was created because Fedora contributors wanted to use Fedora packages they maintain on RHEL and other compatible distributions such as CentOS, Rocky Linux, and AlmaLinux, to name a few.

The EPEL repository is also known for bringing additional packages and updated packages that may be behind in the core repository, along with dependencies required by other external repositories, for example, the Remi PHP repository.

In the following tutorial, you will learn how to install the EPEL repository and the EPEL Next repository, the next testing version that can come into use for newer packages when major upgrades occur to the core distribution on AlmaLinux 9.

Update AlmaLinux

Before proceeding with the tutorial, update your system to ensure all existing packages are up to date to avoid any conflicts during the installation.

sudo dnf upgrade --refresh -y

Install the EPEL/EPEL Next Repository

The first task is to install the EPEL repository, and the recommendation is to install both repositories.

First, enable the CRB repository.

sudo dnf config-manager --set-enabled crb

Next, install EPEL using the following (dnf) terminal command.

sudo dnf install \
    https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \
    https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm

Example output:

How to Install/Enable EPEL/EPEL Next on AlmaLinux 9

You can remove the EPEL Next for those users that do not require or want this; just remove the last line.

Confirm the EPEL/EPEL Next Installation

Now that you have installed the EPEL repository, verifying the installation is good. The easiest and quickest way is to use the dnf repolist command.

dnf repolist | grep epel

Example output:

How to Install/Enable EPEL/EPEL Next on AlmaLinux 9

As above, the repository is shown and successfully installed.

EPEL Repository Tips

One of the handy tricks when using EPEL or EPEL Next repository is to list the available packages.

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

Example output (Note Large Printout):

How to Install/Enable EPEL/EPEL Next on AlmaLinux 9

As above, you can further filter the list to find specific packages. The example will find phpMyAdmin.

EPEL Example:

dnf --disablerepo="*" --enablerepo="epel" list available | grep -i <package name>

EPEL Next Example:

dnf --disablerepo="*" --enablerepo="epel-next" list available | grep -i <package name>

Example output:

How to Install/Enable EPEL/EPEL Next on AlmaLinux 9

Now that you have found the EPEL containing the packages you want to install, use the following command to install them straight out of the EPEL repository.

Example (Replace with your package name):

sudo dnf --enablerepo="epel" install phpMyAdmin

Example output:

Alternatively, users with EPEL Next can use the following command if a newer package exists.

sudo dnf --enablerepo="epel-next" install phpMyAdmin

Note, you can often not use the –enablerepo and use the standard installation command. However, this doesn’t always work when multiple options are present.

How to Remove (Uninstall) EPEL or EPEL Next

Ideally, you should not need to remove the repository once installed. However, if you must remove it, use the following command.

Remove EPEL repository:

sudo dnf remove epel-release

Remove EPEL Next repository:

sudo dnf remove epel-next-release

Comments and Conclusion

Overall, EPEL is a well-known and highly used repository. You will likely need to install this on downstream versions of RHEL as it often contains essential packages every day, especially on servers.



Follow LinuxCapable.com!

Like to get automatic updates? Follow us on one of our social media accounts!