Oracle Linux Logo

Installing EPEL and the Code Ready Builder on Oracle Linux 8 / Oracle Linux 9

After working with Oracle Linux for a while, I had to install EPEL and the Code Ready Builder for a few utilities. This is where I learned that Oracle Linux is slightly different than Rocky Linux, Alma Linux, RHEL.

Package Naming Conventions

The first thing you will notice is that the EPEL and Code Ready Builder are named slightly different than the standard packages. In Oracle Linux, you will find that EPEL and Code Ready Builder are prefixed by either ol8 or ol9. This is based on the installed Oracle Linux version.

View Available Repositories

First we will view available repositories on your installation.

# View available repositories
sudo dnf repolist

Verify Available Repos

On a fresh install of Oracle Linux, the required repos should exist in the directory /etc/yum.repos.d/

Navigate to /etc/yum.repos.d/ and see what repos are available.

The EPEL packages are in the file oracle-epel-ol9.repo

The Code Ready Builder packages are in the file oracle-linux-ol9.repo.

The image below shows a snippet from oracle-linux-ol9.repo, showing the Code Ready Builder section.

Other Notes

You will also notice some place holders in the URIs. These placeholders point to resources in Oracle Cloud. You can examine the values in the directory /etc/yum/vars/. The place holders are for the current instance’s domain, and region, such us-phoenix-1.

Enable and Install EPEL and Code Ready Builder

If the EPEL and the Code Ready builder are completely unavailable, you can enable and install the packages one at a time.

The example below is a fresh install with neither EPEL nor the Code Ready Builder available.

In this case we will enable EPEL and the CodeReady Builder one at a time.

Enable CodeReady Builder

To enable the code ready builder package navigate to the /etc/yum.repos.d/ folder.
With sudo rights, open the oracle-linux-ol9.repo file
Navigate to the [ol9_codeready_builder] section.
Change the enabled value from 0 to 1.
Save the file and exit

You can verify and see that the Code Ready Builder is now enabled.

Install and Enable EPEL

If the EPEL package are not present, you can download and install the packages from Oracle.
Once installed, we can enable EPEL using the commands above.

Download EPEL Packages

If the Oracle Linux 8/9 EPEL packages are not available, we will download and install them.

# Install the EPEL and CRB packages on Oracle Linux 9
sudo dnf install oracle-epel-release-el9.x86_64 -y
# Install the EPEL and CRB packages on Oracle Linux 8
sudo dnf install oracle-epel-release-el8.x86_64 -y

After a few moments, the EPEL package will be succesfully installed.

Verify Available Repositories

Once the EPEL and Code Ready Builder packages are enabled, run the repolist command again.

# View available repositories
sudo dnf repolist

You will see the EPEL and Code Ready Builder are ready for use.

Note: The Code Ready Builder is listed as “Unsupported.” This is expected.

Enabling the Repositories

Next, we will enable the repos, one at a time.

Note: Enabling EPEL and the CodeReady Builder does not display confirmation message.

The first example is for Oracle Linux 9.

# Enable EPEL and the Code Ready Builder on Oracle Linux 9
sudo dnf config-manager --set-enabled ol9_codeready_builder
sudo dnf config-manager --set-enabled ol9_developer_EPEL 

This example is for Oracle Linux 8. As you can see, only the version number changes in the command

# Enable EPEL and the Code Ready Builder on Oracle Linux 8
sudo dnf config-manager --set-enabled ol8_codeready_builder
sudo dnf config-manager --set-enabled ol8_developer_EPEL 

Verify Installation

Once installed and enabled, you can verify using dnf.

# Verify EPEL and CRB installation
sudo dnf list available | egrep "codeready|EPEL"

You will see a list of the available packages. The image below represents a small sample, but you can see both EPEL and CodeReady builder packages listed.

EPEL and CRB Source

The source for oracle Linux packages is found here, on the Oracle Yum repository.

Code Ready Builder – Oracle Linux 8

Code Ready Builder – Oracle Linux 9

EPEL – Oracle Linux 8

EPEL – Oracle Linux 9

Links

Please see these other sites for additional information

https://docs.oracle.com/en/industries/communications/session-monitor/5.1/upgrade/install-oracle-epel-repository.html

https://cloudspinx.com/how-to-enable-epel-repository-on-oracle-linux/

https://unix.stackexchange.com/questions/759404/how-to-yum-install-perlipcrun-on-oracle-linux-9

By Rudy