Ubuntu

Installing RPM on Ubuntu


The ‘.deb’ package is used to install applications on Ubuntu systems. RHEL/CentOS uses RPM as its default package manager. Similarly, we can install the RPM package on Ubuntu also. Debian-based systems, such as RedHat, and Ubuntu-based systems, such as CentOS, Fedora, RHEL, are mostly the same design. The RedHat operating system displays software packages as .rpm files.

Debian-based systems use .deb files. Therefore, they are designed differently and cannot be installed on platforms other than the ones it designed them for. As if .deb files on CentOS and we can only install RPM files on Debian. Porting these packages to other systems can be accomplished in various ways. In this article, we will see how to install RPM files in Ubuntu, and we will see how easy it is.

Initially, RPMs were not developed for Debian-based distributions. Ubuntu does not support RPM packages. Installing packaged RPMs on Ubuntu increases the chances of package dependency conflicts. You can install RPM packages in two different ways. Installing .rpm files directly or converting them to .deb files are straightforward procedures.

Note: RPM packages may not work when installed on Debian-based systems sometimes.

To install RPM packages in Ubuntu, it is necessary to follow some steps, which are as follows:

Method 1: Convert the RPM File into a .deb

Installing .rpm files requires converting them to .deb files to be stable.

First, we must install the “Alien” software package.” This application translates .rpm files into .deb files. To install the Alien software, we first have to add a software repository named “Universe.” Follow the steps below to do this.

sudo add-apt-repository universe

Now, we have to update the system so that we can use the repository.

sudo apt-get update

After you add the Universe repository, you can install Alien using the commands below:

sudo apt-get install alien

Or

sudo apt install alien - y

You may use either of the commands above. If you choose to use either of the commands above, you will receive the correct output. For this, type ‘y’ and enter, and the other process continues. If we use the same second command, we rush it with our permission.

For the installation of the software, you need to download an .rpm file. From there, you open the file location. rpm file exists. Simply copy it and run this command:

sudo alien <name of package>.rpm

As you can see in the above image, we have used Firefox.rpm as a sample page. We have opened Downloads as the current directory in the terminal and then executed the command.

Once you are done, the system will show the following message that clearly defines that the RPM package is successfully converted into a deb package:

Keep in mind that converting the file may take time. Once it is converted, you can install the file, usually using dpkg.

sudo dpkg -i <name of package>.deb

Installing these files is the same as installing a regular .deb package file. After that, you can use the installed software as you usually would.

Method 2: Install RPM Package Directly on Ubuntu

Under this method, we install the .rpm package in Ubuntu without converting it to a .deb file format beforehand.

Under this method, we also have to use alien software. We can install RPM packages directly through this program. The instructions below are for installing an RPM package directly from the terminal window.

This command can cause serious compatibility issues with critical system packages.

sudo alien -i <name of package>.rpm

Note: Ubuntu supports not all formats, so installing packages in non-native formats can be risky.

Conclusion

You will be less likely to make a mistake if you follow the above instructions correctly. In this article, we have described how we can install the packages. We have explained both the methods well here. If you want to know any information related to this article, please tell us by commenting in the comment section.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.