How To Install RPM Packages on Ubuntu 20.04 | Easy Steps
In this tutorial, we’ll explore How To Install RPM Packages on Ubuntu 20.04. RPM stands for Red Hat Package Manager. It is a free and open-source package management system. The name, RPM, was derived from the .rpm file format.
The manager was designed to be used for Linux distributions. Initially, it was made to be used in Red Hat Linux. Now, it’s widely used in other Linux distributions, including Fedora, CentOS, OpenSUSE, OpenMandriva, and Oracle Linux. Most RPM files are binary with the compiled version of the software.
RPMs are centrally stored in one or more repositories on the Internet. A repo location has its own RPM repositories that either act as local mirrors of those Internet repositories or collections of RPMs that are locally maintained. RPM provides a good range of convenient features for package management.
To complete this guide on How To Install RPM Packages on Ubuntu 20.04, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on the Initial Server Setup with Ubuntu 20.04.
1. Install Alien Tool on Ubuntu 20.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 it installed on your server.
First, update your local package index with the following command:
sudo apt update
Then, use the command below to install Alien on Ubuntu 20.04:
sudo apt install alien -y
Verify your Alien installation by checking its version:
alien --version

2. Convert RPM Packages with Alien on Ubuntu
At this point, you can use the alien tool to convert the RPM package you have.
Note: To use this tool, the RPM binary of the software must be on your system before converting it.
sudo alien <mark>software-package.rpm</mark>
For example, ZenMap GUI is not available in Deb binary, only in the 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 a Debian one.
Install Debian Binary
At this point, you have the Debian binary for your RPM package. Now, you can install the same using the given syntax:
sudo dpkg -i <mark>package.deb</mark>
For example:
sudo dpkg -i zenmap-7.92-2.noarch.deb
Alternatively, if you want to perform installation and conversion at the same time, use the following syntax:
sudo alien -i <mark>your-package.rpm</mark>
Conclusion
Ubuntu 20.04 primarily uses DEB packages, it is possible to install RPM packages by converting them with tools like alien. However, this method may lead to compatibility issues, so it’s generally recommended to use native DEB packages or install software from official Ubuntu repositories when available.
Hope you enjoy it. Please subscribe to us on Facebook and YouTube.
You may also like these articles:
How To Install MariaDB 10.9 on Ubuntu 20.04
How To Install NumPy on Ubuntu 20.04
Installing Ubuntu in WSL with New Tar-based Format
Ubuntu Turn Off Automatic Updates From CLI
Alternative Solutions for Installing Software on Ubuntu 20.04
While the alien
tool offers a way to convert and install RPM packages on Ubuntu, it’s crucial to acknowledge its limitations and potential drawbacks. As the original article mentions, compatibility issues can arise due to differences in package dependencies and system configurations between RPM-based and DEB-based distributions. Therefore, exploring alternative approaches for installing software is often advisable. Let’s examine two such alternatives.
1. Using Snap Packages
Snap packages are a universal package format developed by Canonical, the company behind Ubuntu. They are designed to work across various Linux distributions, including Ubuntu, Debian, Fedora, and others. Snaps bundle the application along with all its dependencies, ensuring consistent behavior regardless of the underlying system.
Explanation:
Snap packages offer several advantages over traditional package formats:
- Isolation: Snaps run in a sandboxed environment, preventing them from interfering with the rest of the system.
- Dependencies: All required dependencies are included within the snap package, eliminating dependency conflicts.
- Automatic Updates: Snaps are automatically updated in the background, ensuring you always have the latest version of the software.
- Rollback: If an update causes issues, you can easily roll back to a previous version of the snap.
How to Use Snap Packages:
First, ensure that snapd is installed on your Ubuntu system. It usually comes pre-installed. If not, you can install it using the following command:
sudo apt update
sudo apt install snapd
Once snapd is installed, you can search for available snap packages using the snap find
command:
snap find <software_name>
For example, to find snap packages related to "vlc," you would run:
snap find vlc
To install a snap package, use the snap install
command:
sudo snap install <snap_name>
For example, to install the VLC snap package, you would run:
sudo snap install vlc
To remove a snap package, use the snap remove
command:
sudo snap remove <snap_name>
Example:
Let’s say you want to install the hello-world
snap package:
sudo snap install hello-world
hello-world
sudo snap remove hello-world
While not all software is available as a snap package, it’s worth checking the Snap Store first, especially for popular applications. This is often a more reliable and secure way to install software than converting RPM packages.
2. Using AppImage
AppImage is another universal package format that aims to make Linux applications portable and easy to install. Unlike snaps, AppImages are self-contained executable files that do not require installation.
Explanation:
AppImages offer the following benefits:
- Portability: AppImages can be run on any Linux distribution without modification.
- No Installation: You simply download the AppImage file, make it executable, and run it.
- Self-Contained: AppImages include all necessary dependencies, eliminating dependency conflicts.
- No Root Privileges: AppImages can be run without root privileges.
How to Use AppImages:
-
Download the AppImage: Download the AppImage file for the desired software from the developer’s website or a trusted source.
-
Make the AppImage Executable: Use the
chmod
command to make the AppImage file executable:chmod +x <appimage_file>
For example:
chmod +x myapp.AppImage
-
Run the AppImage: Simply double-click the AppImage file or run it from the command line:
./<appimage_file>
For example:
./myapp.AppImage
Example:
Suppose you have downloaded an AppImage file named krita.appimage
. To run it:
chmod +x krita.appimage
./krita.appimage
The application will then launch.
Integration:
While AppImages are designed to be run directly, you can integrate them into your desktop environment by creating a desktop entry. Several tools can help with this, such as appimaged
which automatically detects and integrates AppImages into your application menu.
In summary, while converting RPM packages for How To Install RPM Packages on Ubuntu 20.04 using alien is possible, it is generally advisable to explore native DEB packages, Snap packages, or AppImages first, as they often provide a smoother and more reliable installation experience and mitigate the risks associated with dependency conflicts and system instability. These alternatives enhance the overall system’s integrity and align better with Ubuntu’s intended package management approach. The best method for How To Install RPM Packages on Ubuntu 20.04 is generally the method that is the most stable and has the least compatibility issues.