Alistair Hardy
Alistair Hardy

Reputation: 465

Installing gdbm in a Oracle Linux 9 Slim container using microdnf returning error: No package matches 'gdbm'

I'm building Ruby from source as we need a specific version that's unavailable from the repositories (3.2.2). The base image is Oracle Linux Slim, so we're using microdnf.

I'm using ruby-env/ruby-build to build ruby from source and according to its instructions it needs this gdbm package. Trying to install it I get

error: No package matches 'gdbm'

So I ran a search for it using microdnf repoquery gdbm

Downloading metadata...
Downloading metadata...
Downloading metadata...
gdbm-1:1.19-4.el9.src
gdbm-1:1.23-1.el9.src

Does anyone know why it's showing as there, but unable to install it?

I've tried making sure the ol9_UEKR7 repo is enabled

[ol9_UEKR7]
name=Oracle Linux 9 UEK Release 7 ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL9/UEKR7/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

Upvotes: 0

Views: 29

Answers (1)

Alistair Hardy
Alistair Hardy

Reputation: 465

The below is what I eventually used to fix it:

microdnf install -y dnf oracle-epel-release-el9
dnf -y install 'dnf-command(config-manager)'
dnf config-manager --enable ol9_codeready_builder

Initially, I was just running microdnf install -y epel-release but being more specific seemed to work. I also switched to using dnf instead of microdnf, though I don't think that made much difference.

Upvotes: 0

Related Questions