Skip to content
Search Rocky Linux

    Browse this documentation

    Adding third-party repos: EPEL, CRB and Remi on Rocky 9 (tested)

    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.

    1. EPEL: dnf install epel-release; the package comes from extras, and enables epel plus epel-cisco-openh264;
    2. CRB: disabled by default; enable per command with --enablerepo=crb instead of permanently;
    3. Remi: install EPEL first, then remi-release, which enables remi-safe and remi-modular.
    Terminal window
    sudo dnf install -y epel-release
    dnf repolist --enabled
    repo id repo name
    appstream Rocky Linux 9 - AppStream
    baseos Rocky Linux 9 - BaseOS
    epel Extra Packages for Enterprise Linux 9 - aarch64
    epel-cisco-openh264 Extra Packages for Enterprise Linux 9 openh264 (From Cisco) - aarch64
    extras Rocky Linux 9 - Extras

    Packages from EPEL become available immediately, for example:

    Terminal window
    dnf list available htop
    htop.aarch64 3.3.0-1.el9 epel
    Terminal window
    sudo dnf install -y glibc-static
    sudo dnf install -y --enablerepo=crb glibc-static
    rpm -q glibc-static
    Error: Unable to find a match: glibc-static ← CRB not enabled
    ...
    glibc-static-2.34-283.el9_8.aarch64 ← only with CRB

    CRB (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”
    Terminal window
    sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm
    dnf repolist --enabled | grep -i remi
    remi-modular Remi's Modular repository for Enterprise Linux 9 - aarch64
    remi-safe Safe Remi's RPM repository for Enterprise Linux 9 - aarch64

    Remi 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”
    PackagePossible sourceAdvice
    htop, tmux and friendsepelUse directly; conflicts are rare
    glibc-static, *-develcrbEnable with --enablerepo=crb per command
    php, redisremi-modular / system modulesCheck dnf module list and use one source only
    nginxappstream / nginx official repoPick 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.

    • Permanently enabling a third-party repo: an enabled=1 third-party repo takes part in dnf update and may replace system packages; prefer --enablerepo;
    • Installing Remi without EPEL: remi-release dependency 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.

    Prerequisite: Rocky 9 with root or sudo.

    Terminal window
    sudo dnf install -y glibc-static # expected to fail
    sudo dnf install -y --enablerepo=crb glibc-static
    rpm -q glibc-static
    dnf repolist --enabled | grep -c crb # expected 0: CRB not enabled permanently

    Checks:

    1. The first command reports Unable to find a match
    2. The second succeeds and rpm -q prints a version
    3. The third prints 0, proving --enablerepo did not change permanent configuration