Skip to content
vast-cow's blog
Go back

Installing bcache-tools from Oracle Linux 9 Repository on Rocky Linux 9

Edit page

When running Rocky Linux 9, you may want to install a package that is only available in Oracle Linux 9’s repositories — such as bcache-tools. However, enabling a whole external repository can cause compatibility issues if many packages are pulled in unintentionally. To avoid this, you can configure includepkgs so that only the desired package is allowed from the Oracle repository.

This article shows a minimal setup to safely install bcache-tools on Rocky Linux 9 using Oracle’s repositories.

Step 1: Import Oracle’s GPG Key

First, download and import the Oracle GPG key:

sudo rpm --import https://yum.oracle.com/RPM-GPG-KEY-oracle-ol9

Step 2: Create a Repository File

Next, create a repo file that points to Oracle Linux 9’s BaseOS repository. Use includepkgs to allow only bcache-tools:

sudo tee /etc/yum.repos.d/ol9-oracle.repo > /dev/null <<'EOF'
[ol9-baseos]
name=Oracle Linux 9 BaseOS Latest ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL9/baseos/latest/$basearch/
gpgcheck=1
enabled=1
includepkgs=bcache-tools
EOF

Key points:

Step 4: Install bcache-tools

Finally, install the package:

sudo dnf install bcache-tools

Thanks to includepkgs, only bcache-tools (and any explicitly listed dependencies) will be pulled from Oracle’s repo.

Notes and Caveats

✅ With this method, you can safely use Oracle Linux’s repository on Rocky Linux to install just bcache-tools — without risking unintentional system-wide package replacements.


Edit page
Share this post:

Comments


Previous Post
Workaround for WSL1 DNS issue
Next Post
How to reliably open YouTube links in the YouTube app using an iOS Shortcut