In this article, we will show you how you can install RPM packages on Ubuntu. Debian-based and RedHat-based Ubuntu systems such as CentOS are mostly similar in design. However, there are a few differences here and there. For example, the RedHat based system uses .rpm files to represent software packages, while the Debian based system uses .deb files. These file types differ in design and cannot be installed outside of their respective operating system type (for example, installing a .deb file on CentOS, or installing an .rpm file on Ubuntu). However, there are ways to import these packages for other types of systems.
There are two ways to install an RPM package, either by converting the .rpm file to a .deb file, or by directly installing the .rpm file. Both methods are fairly straightforward, but installing RPM packages on a Debian system can lead to some problems depending on the software being installed (more on this below).
1. Add the Universe repository
For the first method, you need a software package called “Alien”, which is software designed to convert .rpm files to .deb files. In order to install Alien, you will need to add a software repository called “Universe”. Open a terminal and enter:
sudo add-apt-repository universe
2. Updating apt-get
Enter the password for the user account when the terminal prompts you to do so. Now you need to update apt-get in order to use the repository.
sudo apt-get update
3. Install the Alien package
Now that we have added the Universe to the repository, installed Alien, run the following command:
sudo apt-get install alien
4. Convert .rpm to .deb
After installation, make sure you download the .rpm file for the software package. Go to the folder where the .rpm file is located. Rpm file ready, just run the following command:
sudo alien <name of package>.rpm
5. Install the converted package
It may take a while for the file to convert. Once that’s done, install the file, usually with DPKG:
sudo dpkg -i <name of package>.deb
It should install like a regular .deb file. Now you can use the software you just installed.
6. Installing the RPM package directly on the system
For another method, Alien is also software used to install RPM packages directly onto the system. Just run the following command in the same folder as the RPM package you want to install.
sudo alien -i <name of package>.rpm
Give it a minute and it should be installed on your system without any problem.
Keep in mind that it is generally not a good idea to install packages that were not intended for your system. This can lead to dependency problems, and can lead to errors or even crashes. If the program you are installing has some dependencies that need to be installed, you will need to install them first.
All of these converted packages only increase the chances that the software will not function properly, so this is at your own risk. If there is no replacement for .deb available, then compiling the source code on your computer may be the best choice whenever possible.
Please disable your ad blocker or whitelist this site!