In this tutorial, we will show you how you can install RPM packages on Ubuntu. Debian-based systems such as Ubuntu and RedHat-based systems such as CentOS are mostly similar in their design. However, there are a few differences here and there. For example, RedHat-based systems use .rpm files for representing software packages, while Debian-based systems use .deb files. These file types differ from one another in their design, and cannot be installed outside of their respective type of operating systems (e.g. installing a .deb file on CentOS, or installing a .rpm file on Ubuntu). However, there are ways to port these packages to other types of systems.
There are two ways to install an RPM package: either by converting the .rpm file into a .deb file or by installing the .rpm file directly. Both methods are fairly simple, but installing RPM packages on a Debian-based system can lead to some issues, depending on the software being installed (more on this down below).
Step 1: Add the Universe Repository
For the first method, you will need a software package called “Alien”, which is software designed to convert .rpm files into .deb files. In order to install Alien, you will need to add a software repository called “Universe”. Open a terminal and type:
sudo add-apt-repository universe
Step 2: Update apt-get
Enter your user account password when the terminal prompts you to do so. Now, you need to update apt-get in order for the repository to be utilized.
sudo apt-get update
Step 3: Install Alien package
Now that we have the Universe repository added, install Alien by executing this command:
sudo apt-get install alien
Step 4: Convert .rpm to .deb
Once it is installed, make sure that the software package you have downloaded is an .rpm file. Go to the folder where your .rpm file is located. Once you have the .rpm file ready, simply run the command:
sudo alien <name of package>.rpm
5. Install the Converted Package
It may take a moment for the file to convert. Once it is done, install the file normally by using dpkg:
sudo dpkg -i <name of package>.deb
It should install like a regular .deb package file. You can now use your newly-installed software normally.
Step 6: Install RPM Package Directly Onto the System on Ubuntu
For the other method, Alien is also the software used to install RPM packages directly onto the system. Simply run the following command once you are in the same folder as the RPM package you wish to install.
sudo alien -i <name of package>.rpm
Give it a minute, and it should be installed on your system with no issues.
Keep in mind that it typically isn’t a good idea to install packages that were not meant for your system. It can lead to dependency issues and can cause errors or even crash. If the software you are installing has some dependencies that need to be installed, you will need to install these first.
All of these converted packages only increase the chance of the software not functioning properly, so do this at your own risk. If there is no available .deb substitute, then compiling the source code on your machine might be a better choice when possible.
If you use one of our Ubuntu Hosting plans, you don’t have to search for .deb packages or convert RPM packages yourself – you can simply ask our expert Linux admins to find and install these packages onto your VPS for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post on how to install RPM packages on Ubuntu, please share it with your friends on the social networks using the buttons on the left, or simply leave a reply below. Thanks.