This evening I’m trying to enable EPEL repository on a RHEL 9 server, by following instruction is taken from How to install EPEL on RHEL and CentOS Stream article [1] by Red Hat Enable Sysadmin.

  1. Enable the CodeReady Linux Builder repository.
$ sudo subscription-manager repos --enable \
    codeready-builder-for-rhel-9-$(arch)-rpms

Repository 'codeready-builder-for-rhel-9-x86_64-rpms' is enabled for this system.
  1. Install the EPEL RPM.
$ sudo dnf install \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

...snip...

Installed:
  epel-release-9-7.el9.noarch

Complete!
  1. Let’s try to install htop (available from the EPEL repo) to verify that everything is working:
$ sudo dnf install htop -y
...snip...

$ rpm -q htop
htop-3.2.2-1.el9.x86_64

That’s it!