How to Install RPM Fusion on Rocky Linux 9/8

Installing RPM Fusion on Rocky Linux, a distribution based on RHEL, unlocks a vast array of software that isn’t available in the default repositories. This enhances your system’s functionality and flexibility, particularly for users seeking multimedia capabilities and additional open-source applications.

Key Features and Benefits:

  • Expanded Software Library: Access to a wide range of packages, including multimedia codecs, drivers, and other software not included in the default repositories.
  • Regular Updates: Frequent updates ensure you have the latest software versions, enhancing security and performance.
  • Community Support: Benefit from a community-driven repository that provides reliable and thoroughly tested packages.
  • Enhanced Multimedia Support: Install essential multimedia codecs and tools easily, ensuring better media handling and playback.
  • Ease of Use: Simple installation and configuration process, integrated seamlessly with your existing package management system.
  • Open-Source Focus: Prioritizes open-source packages, aligning with the ethos of many Linux users and developers.

With the introduction out of the way, let’s explore how to install RPM Fusion on Rocky Linux 9 or 8 utilizing the command-line terminal.

Step 1: Update Rocky Linux Before RPM Fusion Installation

Before continuing, please ensure all existing software is updated on Rocky Linux to avoid any potential issues during the installation and ensure good system maintenance.

sudo dnf upgrade --refresh

Step 2: Import EPEL & EPEL Next Repository

Note: Ensure you import the correct EPEL repository for RPM Fusion, matching the Rocky Linux version you are currently using.

The first step is to install the EPEL repository, and the recommended approach is to install both repositories.

Import EPEL for Rocky Linux 9

The first step is to enable the CRB repository.

sudo dnf config-manager --set-enabled crb
sudo dnf install \
    https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \
    https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm

Import EPEL for Rocky Linux 8

sudo dnf install \
    https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \
    https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-8.noarch.rpm

Step 3: Install RPM Fusion

RPM Fusion provides two repositories, “free” and “non-free,” with different software packages. The “free” repository contains open-source packages licensed under a free and open-source license, such as the GPL. These packages can be freely distributed, modified, and used without restrictions. They are “free as in freedom,” not just “free of charge.”

The “non-free” repository contains packages that are not open-source or licensed under a free and open-source license. These packages may be distributed, modified, and used under certain conditions but not freely distributed or modified. Examples of packages in the non-free repository include proprietary drivers and multimedia codecs.

Notably, packages in the non-free repository may be licensed more permissively than commercial software. Still, the Free Software Foundation does not consider them free software.

Install RPM Fusion Free Repository.

sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm -y

Install RPM Fusion Non-Free Repository.

sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm -y

Next, verify the installation with the following command:

dnf repolist | grep rpmfusion

Example output:

rpmfusion-free-updates    RPM Fusion for EL 9 - Free - Updates
rpmfusion-nonfree-updates RPM Fusion for EL 9 - Nonfree - Updates

Step 4: Enable RPM Fusion Testing Updates

Enabling the RPM Fusion testing branch allows you to receive the latest software versions, if available in the testing repository before they make their way to the stable branch. As with any testing branch, use with caution.

Enable the Free Testing Updates Repository

sudo dnf config-manager --set-enabled rpmfusion-free-updates-testing

Enable the Non-Free Testing Updates Repository

sudo dnf config-manager --set-enabled rpmfusion-nonfree-updates-testing

Check to see if the testing RPM fusions have been added.

dnf repolist | grep rpmfusion

Example output:

rpmfusion-free-updates            RPM Fusion for EL 9 - Free - Updates
rpmfusion-free-updates-testing    RPM Fusion for EL 9 - Free - Test Updates
rpmfusion-nonfree-updates         RPM Fusion for EL 9 - Nonfree - Updates
rpmfusion-nonfree-updates-testing RPM Fusion for EL 9 - Nonfree - Test Updates

Step 5: RPM Fusion Command Examples

First, list what is available in the RPM Fusion repositories you imported.

List all Packages

dnf --enablerepo=rpmfusion-* list available | grep rpm fusion | more

Additionally, installing the dnf-utilities package can yield better results.

sudo dnf install dnf-utils -y

Then, use the repo query command. The example will continue to use Discord.

sudo repoquery -i VirtualBox

As you can see, the VirtualBox package is coming from the RPM Fusion Free repository.

Install RPM Fusion AppStream Meta Data

The RPM Fusion repository provides packages for GNOME and KDE Discover.

sudo dnf groupupdate core

Install RPM Fusion Multimedia

RPM Fusion repositories provide packages and updates to play multimedia files and GStreamer compatibility.

Install multimedia packages for GStreamer Enabled Applications:

sudo dnf groupupdate multimedia --setop="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin

Install sound and video packages required by some applications:

sudo dnf groupupdate sound-and-video

Step 5: Tainted RPM Fusion Repositories

RPM Fusion has what is known as “tainted” repositories for free and non-free. To sum up, these repositories contain illegal software in certain countries due to licensing.

Install Taint RPM Fusion Free support (For Floss Packages)

sudo dnf install rpmfusion-free-release-tainted

Install Taint RPM Fusion Non-Free support (For Non-Floss Packages)

sudo dnf install rpmfusion-nonfree-release-tainted

An example is installing additional tainted proprietary support packages.

sudo dnf install \*-firmware

Once done, use the grep command to check the dnf repolist of all the installed RPM Fusions.

dnf repolist | grep rpmfusion

As mentioned above, you can see that the tutorial has all repositories of RPM Fusion enabled; ideally, you would only have the standard installed for most situations.

Additional Tips: Updating and Removing RPM Fusion

How to Disable RPM Fusion Testing Updates

If you no longer require the RPM fusion testing repository, you can disable it by using one of the following commands that match the repository you enabled.

Disable the Free Testing Updates Repository

sudo dnf config-manager --set-disabled rpmfusion-free-updates-testing

Disable the Non-Free Testing Updates Repository

sudo dnf config-manager --set-disabled rpmfusion-nonfree-updates-testing

How to Remove (Uninstall) RPM Fusion

Removing repositories from your system is relatively easy. To remove repositories, you need to find their name and use the dnf remove command. First, make sure to have the full name. This can be done using the following command.

Remove the Free Repository

sudo dnf remove rpmfusion-free-release -y

Remove the Non-Free Repository

sudo dnf remove rpmfusion-nonfree-release -y

Remove the Free (Tainted) Repository

sudo dnf remove rpmfusion-free-release-tainted -y

Remove the Non-Free (Tainted) Repository

sudo dnf remove rpmfusion-nonfree-release-tainted -y

To re-install the Fusion drive, repeat the process at the start of the tutorial.

Conclusion

There are a few reputable package repositories that you can use on RHEL-based distributions, and one of the most well-respected is RPM Fusion. It’s easy to set up and use, giving you access to many software unavailable in the default repositories.

To search the RPM Fusion repository database for packages, visit here.

Leave a Comment