In this brief guide, we will see what is RPM Fusion repository, why should we install RPM Fusion repository, and finally how to enable RPM Fusion repository in Fedora, RHEL, and its clones like CentOS, AlmaLinux distributions.
What is RPM Fusion repository?
Fedora project strictly adheres the Fedora licensing policies. It excludes some packages from the official repositories for the following reasons:
- If a package is propriety, it can’t be included in Fedora;
- If a package is closed-source, it can’t be included in Fedora;
- If a package is legally encumbered, it cannot be included in Fedora;
- If package violates United States laws (specifically, Federal or applicable state laws), it cannot be included in Fedora.
Any package that fails to meet the aforementioned policies will not be included in the official repositories of Fedora and RHEL. This is why some third party repositories, which have liberal licensing policies, are created. One such repository is RPM Fusion.
RPM Fusion is a community-maintained, third-party software repository that provides packages that the Fedora project and Red Hat can’t ship due to legal and various other reasons as stated earlier. The RPM Fusion is a must have to install the necessary multimedia codecs, proprietary software and drivers in Fedora, RHEL and its clones like CentOS, AlmaLinux etc.
RPM Fusion has two repositories namely
free repository contains the packages that are Open Source as defined by Fedora licensing guidelines. The
nonfree repository contains redistributable packages that are not Open Source and packages that are not free for commercial purpose.
You can add both repos and use them simultaneously on your personal system. There won’t be any conflicts between the packages in the
nonfree repos. If you’re interested in running only free packages, just add the
free repo and install the
nonfree repo later.
1. Enable RPM Fusion repository in Fedora Linux
To enable both the
free and the
nonfree RPM Fusion repositories on your Fedora system, run:
$ sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
Last metadata expiration check: 1:51:10 ago on Thursday 29 April 2021 02:10:14 PM. rpmfusion-free-release-34.noarch.rpm 5.5 kB/s | 11 kB 00:02 rpmfusion-nonfree-release-34.noarch.rpm 6.6 kB/s | 11 kB 00:01 Dependencies resolved. Package Architecture Version Repository Size Installing: rpmfusion-free-release noarch 34-1 @commandline 11 k rpmfusion-nonfree-release noarch 34-1 @commandline 11 k Transaction Summary Install 2 Packages Total size: 23 k Installed size: 11 k Is this ok [y/N]: y Downloading Packages: Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : rpmfusion-nonfree-release-34-1.noarch 1/2 Installing : rpmfusion-free-release-34-1.noarch 2/2 Verifying : rpmfusion-free-release-34-1.noarch 1/2 Verifying : rpmfusion-nonfree-release-34-1.noarch 2/2 Installed: rpmfusion-free-release-34-1.noarch rpmfusion-nonfree-release-34-1.noarch Complete!
Like I already mentioned, you can install only the
free repo like below:
$ sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
To enable non-free RPM Fusion repository, do:
$ sudo dnf install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
On Fedora Silverblue:
To add and enable
nonfree RPM Fusion repositories on a Fedora Silverblue machine, run:
$ sudo rpm-ostree install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
Well, RPM Fusion repositories have been added. You can verify if the repositories are added using the following command:
$ dnf repolist repo id repo name fedora Fedora 34 - x86_64 fedora-cisco-openh264 Fedora 34 openh264 (From Cisco) - x86_64 fedora-modular Fedora Modular 34 - x86_64 rpmfusion-free RPM Fusion for Fedora 34 - Free rpmfusion-free-updates RPM Fusion for Fedora 34 - Free - Updates rpmfusion-nonfree RPM Fusion for Fedora 34 - Nonfree rpmfusion-nonfree-updates RPM Fusion for Fedora 34 - Nonfree - Updates updates Fedora 34 - x86_64 - Updates updates-modular Fedora Modular 34 - x86_64 - Updates
If you want to list only the enabled repositories, the command would be:
$ dnf repolist enabled
The first time you attempt to install packages from the RPM Fusion repositories, the
dnf utility prompts you to confirm the signature of the repositories. Type
y and hit ENTER to confirm it.
[...] warning: /var/cache/dnf/rpmfusion-free-27856ae4f82a6a42/packages/ffmpeg-4.4-2.fc34.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID d651ff2e: NOKEY RPM Fusion for Fedora 34 - Free 1.6 MB/s | 1.7 kB 00:00 Importing GPG key 0xD651FF2E: Userid : "RPM Fusion free repository for Fedora (2020) [email protected]" Fingerprint: E9A4 91A3 DE24 7814 E7E0 67EA E06F 8ECD D651 FF2E From : /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-34 Is this ok [y/N]: y [...]
2. Enable RPM Fusion repository in RHEL
In RHEL and its clones like CentOS, AlmaLinux etc., you must enable EPEL repository before enabling RPM Fusion repository.
To install EPEL repository in Red Hat Enterprise Linux system, run:
$ sudo dnf install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
After enabling the EPEL repository, run the following command to enable RPM Fusion repository in RHEL 8 and its compatible clones CentOS 8 and AlmaLinux 8:
$ sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm
If you are using CentOS Steam 8, you need to enable [PowerTools] repository as well.
$ sudo dnf config-manager --enable powertools
In RHEL 7 and its compatible clones like CentOS 7, run the following command to enable EPEL and RPM Fusion repositories:
$ sudo yum localinstall --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm
You can view the list the installed repositories at any time using the following commands:
$ dnf repolist
$ yum repolist
That’s it. You know now how to enable RPM Fusion repository RPM-based systems such as Fedora, RHEL, CentOS and AlmaLinux. RPM Fusion is mandatory if you want to install any packages that are not included in the official repositories.