How To Install RPM Packages on Ubuntu 20.04

In this Tutorial from the Orcacore website, we intend to teach you How To Install RPM Packages on Ubuntu 20.04. RPM stands for Red Hat Package Manager. It is a free and open-source package management system. The name, RPM, was derived from the .rpm file format.

The manager was designed to be used for Linux distributions. Initially, it was made to be used in Red Hat Linux. Now, it’s widely used in other Linux distributions, including Fedora, CentOS, OpenSUSE, OpenMandriva, and Oracle Linux. Most RPM files are binary with the compiled version of the software.

RPMs are centrally stored in one or more repositories on the Internet. A repo location has its own RPM repositories that either act as local mirrors of those Internet repositories or collections of RPMs that are locally maintained. RPM provides a good range of convenient features for package management.

Steps To Install RPM Packages on Ubuntu 20.04

To complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on the Initial Server Setup with Ubuntu 20.04.

1. Install Alien Tool on Ubuntu 20.04

Alien is a command-line tool that allows you to convert Debian packages to RPM packages, and vice versa. So you need to have it installed on your server.

First, update your local package index with the following command:

sudo apt udpate

Then, use the command below to install Alien on Ubuntu 20.04:

sudo apt install alien -y

Verify your Alien installation by checking its version:

alien --version
Alien version ubuntu 20.04

2. Convert RPM Packages with Alien on Ubuntu

At this point, you can use the alien tool to convert the RPM package you have. 

Note: To use this tool, the RPM binary of the software must be on your system before converting it.

sudo alien software-package.rpm

For example, ZenMap GUI is not available in Deb binary, only in the RPM one. To convert it, run the command below:

sudo alien zenmap-7.92-1.noarch.rpm

This will convert and save the RPM binary to a Debian one.

Install Debian Binary

At this point, you have the Debian binary for your RPM package. Now, you can install the same using the given syntax:

sudo dpkg -i package.deb

For example:

sudo dpkg -i zenmap-7.92-2.noarch.deb

Alternatively, if you want to perform installation and conversion at the same time, use the following syntax:

sudo alien -i your-package.rpm

Conclusion

Ubuntu 20.04 primarily uses DEB packages, it is possible to install RPM packages by converting them with tools like alien. However, this method may lead to compatibility issues, so it’s generally recommended to use native DEB packages or install software from official Ubuntu repositories when available.​​​

Hope you enjoy it. Please subscribe to us on Facebook and YouTube.

You may also like these articles:

How To Install MariaDB 10.9 on Ubuntu 20.04

How To Install NumPy on Ubuntu 20.04

Installing Ubuntu in WSL with New Tar-based Format

Ubuntu Turn Off Automatic Updates From CLI

Share your love

Stay informed and not overwhelmed, subscribe now!