I want to install htop on Oracle Linux 8.7. How hard could it be?

TL;DR; - it’s not hard, but it took me a little while to get htop installed. I’m not new to (most) Linux distros, but this is the first time I’m using Oracle Linux.

So, let’s start by showing some basic information.

[root@catbus ~]# cat /etc/os-release | grep -i pretty
PRETTY_NAME="Oracle Linux Server 8.7"

[root@catbus ~]# rpm -qi htop
package htop is not installed

[root@catbus ~]# dnf search htop
Last metadata expiration check: 0:23:03 ago on Mon 06 Feb 2023 11:32:58 AM GMT.
No matches found.

The above output shows that htop is not installed, and the package is not available in all enabled repositories.

We know that htop is available on the EPEL repo for CentOS 8, RockyLinux 8, AlamLinux 8…etc. Following this route, we can try to enable EPEL repo on this machine.

[root@catbus ~]# dnf search epel
Last metadata expiration check: 0:25:49 ago on Mon 06 Feb 2023 11:32:58 AM GMT.
========================== Name & Summary Matched: epel ================================================
oracle-epel-release-el8.x86_64 : Extra Packages for Enterprise Linux (EPEL) yum repository configuration
oracle-epel-release-el8.src : Extra Packages for Enterprise Linux (EPEL) yum repository configuration

[root@catbus ~]# rpm -q oracle-epel-release-el8.x86_64
oracle-epel-release-el8-1.0-5.el8.x86_64

[root@catbus ~]# dnf repolist
repo id                                       repo name
ol8_MySQL80                                   MySQL 8.0 for Oracle Linux 8 (x86_64)
ol8_MySQL80_connectors_community              MySQL 8.0 Connectors Community for Oracle Linux 8 (x86_64)
ol8_MySQL80_tools_community                   MySQL 8.0 Tools Community for Oracle Linux 8 (x86_64)
ol8_UEKR6                                     Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux 8 (x86_64)
ol8_addons                                    Oracle Linux 8 Addons (x86_64)
ol8_appstream                                 Oracle Linux 8 Application Stream (x86_64)
ol8_baseos_latest                             Oracle Linux 8 BaseOS Latest (x86_64)
ol8_ksplice                                   Ksplice for Oracle Linux 8 (x86_64)
ol8_oci_included                              Oracle Software for OCI users on Oracle Linux 8 (x86_64)

Let’s try to understand what is shown above. On Oracle Linux 8, the EPEL repo is provided by a package named oracle-epel-release-el8.x86_64 and it looks like it’s already been installed.

Listing all the (enabled) repos, it looks like the EPEL repo is not enabled. Let’s confirm that.

[root@catbus ~]# dnf repolist --all | grep -i epel
ol8_developer_EPEL               Oracle Linux 8 EPEL Packages for Devel disabled
ol8_developer_EPEL_modular       Oracle Linux 8 EPEL Modular Packages f disabled

Ah, the EPEL repo was installed but not enabled yet. Let’s do it.

[root@catbus ~]# dnf repolist --all | grep -i epel
ol8_developer_EPEL               Oracle Linux 8 EPEL Packages for Devel enabled
ol8_developer_EPEL_modular       Oracle Linux 8 EPEL Modular Packages f disabled

At this point, we should be able to install htop as usual.

[root@catbus ~]# dnf install htop -y
Oracle Linux 8 EPEL Packages for Development (x86_64)                          26 MB/s |  41 MB     00:01
Last metadata expiration check: 0:00:32 ago on Mon 06 Feb 2023 12:05:39 PM GMT.
Dependencies resolved.
=========================================================================================================
 Package                  Architecture               Version            Repository                   Size
=========================================================================================================
Installing:
 htop                     x86_64                     3.2.1-1.el8        ol8_developer_EPEL          171 k

Transaction Summary
=========================================================================================================
Install  1 Package

Total download size: 171 k
Installed size: 396 k
Downloading Packages:
htop-3.2.1-1.el8.x86_64.rpm                                                    876 kB/s | 171 kB     00:00
----------------------------------------------------------------------------------------------------------
Total                                                                          834 kB/s | 171 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                   1/1
  Installing       : htop-3.2.1-1.el8.x86_64                                                           1/1
  Running scriptlet: htop-3.2.1-1.el8.x86_64                                                           1/1
  Verifying        : htop-3.2.1-1.el8.x86_64                                                           1/1

Installed:
  htop-3.2.1-1.el8.x86_64

Complete!

[root@catbus ~]# rpm -q htop
htop-3.2.1-1.el8.x86_64

Well, if you followed along, hope you’ve learned something.