How To Install RPM Packages on Ubuntu 22.04

In this guide, we want to teach you How To Install RPM Packages on Ubuntu 22.04.

RPM stands for Red Hat Package Manager. RPM is a powerful Package Manager for Red Hat, Suse, and Fedora Linux. It can be used to build, install, query, verify, update, and remove/erase individual software packages. A Package consists of an archive of files, and package information, including name, version, and description.

Steps To Install RPM Packages on Ubuntu 22.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 the Initial Server Setup with Ubuntu 22.04.

Install Alien command-line Tool on Ubuntu 22.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 installed it 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 22.04:

sudo apt install alien

Verify your Alien installation by checking its version:

alien --version
Output
alien version 8.95

Convert RPM Packages with Alien on Ubuntu

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

Important 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 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 Debian one.

Install Debian Binary

At this point, you have the Debian binary for your RPM package on Ubuntu 22.04. 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 both at the same time, use the following syntax:

sudo alien -i your-package.rpm

Conclusion

At this point, you have learned to Install RPM Packages on Ubuntu 22.04.

Hope you enjoy this guide from the Basic Linux Tutorials.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!