Adding third-party repos: EPEL, CRB and Remi on Rocky 9 (tested)
When to use it
Section titled “When to use it”The system repos do not carry what you need (htop, glibc-static, a newer PHP), so you add a third-party source. Order matters: EPEL first, Remi depends on EPEL; CRB is not third-party at all — it ships with Rocky but is disabled by default.
Order: EPEL → CRB → Remi
Section titled “Order: EPEL → CRB → Remi”- EPEL:
dnf install epel-release; the package comes from extras, and enablesepelplusepel-cisco-openh264; - CRB: disabled by default; enable per command with
--enablerepo=crbinstead of permanently; - Remi: install EPEL first, then
remi-release, which enablesremi-safeandremi-modular.
EPEL: two more repos after install
Section titled “EPEL: two more repos after install”sudo dnf install -y epel-releasednf repolist --enabledrepo id repo nameappstream Rocky Linux 9 - AppStreambaseos Rocky Linux 9 - BaseOSepel Extra Packages for Enterprise Linux 9 - aarch64epel-cisco-openh264 Extra Packages for Enterprise Linux 9 openh264 (From Cisco) - aarch64extras Rocky Linux 9 - ExtrasPackages from EPEL become available immediately, for example:
dnf list available htophtop.aarch64 3.3.0-1.el9 epelCRB: off by default, enabled per command
Section titled “CRB: off by default, enabled per command”sudo dnf install -y glibc-staticsudo dnf install -y --enablerepo=crb glibc-staticrpm -q glibc-staticError: Unable to find a match: glibc-static ← CRB not enabled...glibc-static-2.34-283.el9_8.aarch64 ← only with CRBCRB (CodeReady Builder) carries development and build dependencies (*-devel, glibc-static and similar). No need to turn it off afterwards — --enablerepo applies to that single command.
Remi: EPEL first, then the release package
Section titled “Remi: EPEL first, then the release package”sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpmdnf repolist --enabled | grep -i remiremi-modular Remi's Modular repository for Enterprise Linux 9 - aarch64remi-safe Safe Remi's RPM repository for Enterprise Linux 9 - aarch64Remi provides newer PHP/Redis and similar. PHP versions are selected through module streams (remi-modular); run dnf module list php before installing.
Conflict matrix: one package, several sources
Section titled “Conflict matrix: one package, several sources”| Package | Possible source | Advice |
|---|---|---|
htop, tmux and friends | epel | Use directly; conflicts are rare |
glibc-static, *-devel | crb | Enable with --enablerepo=crb per command |
php, redis | remi-modular / system modules | Check dnf module list and use one source only |
nginx | appstream / nginx official repo | Pick one; do not mix |
There is one rule: let exactly one source provide a given package. If a version changes after --enablerepo, or dnf update wants to replace a system package with a third-party build, two sources are fighting over it.
Common traps
Section titled “Common traps”- Permanently enabling a third-party repo: an
enabled=1third-party repo takes part indnf updateand may replace system packages; prefer--enablerepo; - Installing Remi without EPEL:
remi-releasedependency resolution fails or leaves a half-configured repo; - GPG key not imported: the first install asks for confirmation, which hangs scripts; think before reaching for
--nogpgcheck.
Practice: enable CRB for one package only
Section titled “Practice: enable CRB for one package only”Prerequisite: Rocky 9 with root or sudo.
sudo dnf install -y glibc-static # expected to failsudo dnf install -y --enablerepo=crb glibc-staticrpm -q glibc-staticdnf repolist --enabled | grep -c crb # expected 0: CRB not enabled permanentlyChecks:
- The first command reports
Unable to find a match - The second succeeds and
rpm -qprints a version - The third prints
0, proving--enablerepodid not change permanent configuration
Next steps
Section titled “Next steps”- The three ways to resolve repo conflicts: Repository conflicts
- Building a local repo: Offline package installs
- Package history and rollback: dnf history undo