How to install RPM packages on Ubuntu 20.04 LTS

RPM (Red Hat Package Manager) packages are meant to compile and install on RHEL and its based operating systems such as CentOS, Fedora, and more… However,  we can also install RPM packages on Ubuntu by converting them to DEB packages. And here in this article, we know how?

Many times, there are some software packages that are not available for Ubuntu (uses APT package Manager and Debian packages). Even though both RHEL and Ubuntu are Linux but the building format of packages to install on them is different.

For example, Zenmap, a GUI interface for the Nmap network analysis tool is available as a pre-compiled binary in RPM format, thus those who want it on Ubuntu 20.04 LTS, first need to convert it in Ubuntu installable Deb package. Thus, here are the steps to follow which are also applicable for Ubuntu 19.04/18.04/16.04,  Linux Mint, Debian, MX Linux, Zorin OS, and more…

1. Run System Update

Open command terminal, the shortcut is Ctrl+Alt+T, and then use the system update command to let all the installed packages achieve their latest state including the rebuilding of repo cache.

sudo apt update

 

2. Install Alien- Package convertor

Now, we install Alien software on our Ubuntu 20.04 LTS that will help us to convert the RPM package into Debian compatible DEB format. To install it we don’t need to add any third-party repository because it is already there on the official repo.

sudo apt install alien -y

Install Alien package convertor on Ubuntu 20.04

 

3.  Get some RPM package to install on Ubuntu

Next thing we need the RPM package of software you want to install on your Ubuntu 20.04, here we are downloading the binary for Zenmap available in the RPM format.

 

4. Convert RPM to DEB

Once the RPM package that you want to convert and install on Ubuntu is on your system, run the below command to install the same.

sudo alien package-name

for example, we have download Zenmap, thus we use its filename:

sudo alien zenmap-7.91-1.noarch.rpm

 

5. Install RPM converted Debian file

We can use two commands to install Deb packages, one is dpkg and the other the regular APT package manager of Debian-based Linux operating systems.

Once the conversion process will be done, the Alien will save the RPM converted Debian file in the same directory where the source file is located.

To use the DPKG command:

sudo dpkg -i zenmap_7.91-2_all.deb

Using APT:

sudo apt install ./zenmap_7.91-2_all.deb

Converrt and install RPM software on Ubuntu 20 compressed

 

6. Single Command to convert and install RPM on Ubuntu

Well, if you don’t want to go two steps – one is conversion and other installation, then we can use a single command not only to convert but also install the converted Debian file.

sudo alien -i rpm-filename

example

sudo alien -i zenmap-7.91-1.noarch.rpm

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.