How to Access the EPEL Archive on Rocky Linux
Introduction
EPEL has recently switched to using separate dnf repositories and dist-git branches for all versions of Enterprise Linux 10, after the release of Enterprise Linux 10.1. This also prompted EPEL for Enterprise Linux 9 to be moved to EPEL 9.7
One impact of this change, is that some packages such as gdal-devel were incorporated directly into a point release and made no longer available in older minor versions of EPEL. Users on lower minor releases of Enterprise Linux (Rocky Linux 9.6 for example), were therefore unable to pull certain packages that they needed from EPEL.
Problem
Users on CIQ's Rocky Linux LTS product line are unable to acquire the packages that they need from EPEL.
Symptoms
For example, you are running Rocky Linux 9.6 and have the EPEL repository enabled. You attempt to install the liblas-devel package and observe the following error:
[root@rocky-linux96 ~]# dnf install liblas-devel
# Output truncated
Error:
Problem: conflicting requests
- nothing provides gdal-devel needed by liblas-devel-1.8.2-0.3.gitded4637.el9.x86_64 from epel
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Resolution
To keep getting access to EPEL packages, please utilize the EPEL archive by performing the following steps.
Modify /etc/yum.repos.d/epel.repo and point the epel repository to the EPEL archive. The below example fixes the above error as shown in the Symptoms section:
sed -i 's|#baseurl=https://download.example/pub/epel/.*/Everything/$basearch/|baseurl=https://dl.fedoraproject.org/pub/archive/epel/9.6/Everything/$basearch/|' /etc/yum.repos.d/epel.repo
sed -i '/^\[epel\]$/,/^\[/{s|^metalink=|#metalink=|}' /etc/yum.repos.d/epel.repo```
Observe that the liblas-devel package can now be installed successfully:
[root@rocky-linux96 ~]# dnf install liblas-devel
# Output truncated
Installing:
liblas-devel x86_64 1.8.2-0.3.gitded4637.el9 epel 112 k
Root Cause
Some EPEL packages being removed from EPEL and then incorporated into later Enterprise Linux minor version releases, breaks packages on older Enterprise Linux minor versions that are reliant on EPEL.
Notes
- Pinning your EPEL repository to a specific archive version will prevent you from receiving security updates and bug fixes for EPEL packages.
References & related articles
EPEL Branches - Fedora Docs
Rocky 9.7, Rocky 10.1 and EPEL - Rocky Linux Forum