In this tutorial, we will explain how to install RPM packages on the Ubuntu 24.04 operating system. Yes, that’s right, you read that very well. It is possible to install Red Hat-based derivatives on a Debian-based system. RPM, or Red Hat Package Manager, is a free and open-source package management system for installing, removing, and managing software packages in Linux. RPM is a package format used by Red Hat derivatives, such as CentOS, Fedora, RHEL, and AlmaLinux. In this blog post, we will focus on installing these packages on the latest Debian-based Ubuntu 24.
Installing RPM packages on Ubuntu 20.04 is a straightforward process that typically takes between 5 minutes and 10 minutes. Let’s get started!
Table of Contents
Prerequisites
- A server running Ubuntu 24.04 OS
- User privileges: root or non-root user with sudo privileges
Update the System
Before installing the RPM packages, it is recommended to update the system packages to their latest available versions. To do that, execute the following command:
sudo apt update -y && sudo apt upgrade -y
What is Alien, and how do I install it?
The RPM packages. .rpm cannot be installed on Ubuntu systems with the basic command apt install example.rpm. Therefore, the .rpm packages need to be converted to a .deb file OR installed with the help of the alien command. In both cases, we need Alien.
Alien is a handy tool for converting between the Red Hat and Debian-based systems. We can convert .rpm to .deb, .deb to .rpm, and also Solaris, Stampede, and Slackware files. However, in this tutorial, we will focus on converting from .rpm to .deb.
Alien by default is included in the Ubuntu 24.04 repository, so that we can install it with the command below:
sudo apt install alien -y
Once installed, you can check the alien version with:
alien -V
You should get the following output:
root@host:~# alien -V alien version 8.95.6
Now, let’s proceed to explore the two different methods for installing RPM packages on Ubuntu 24.04.
Convert RPM to DEB
As we mentioned previously, one way to install .rpm packages on Ubuntu 24 is to first convert them to .deb packages. To do that, let’s first download a .rpm package:
wget https://rpmfind.net/linux/centos-stream/10-stream/AppStream/x86_64/os/Packages/mysql-8.4.2-5.el10.x86_64.rpm
Once downloaded to convert the RPM package to DEB, execute the command below:
sudo alien mysql-8.4.2-5.el10.x86_64.rpm
If everything is OK, you should get output similar to this:
root@host:~#sudo alien mysql-8.4.2-5.el10.x86_64.rpm warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY warning: mysql-8.4.2-5.el10.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8483c65d: NOKEY mysql_8.4.2-6_amd64.deb generated
Now, to install the converted RPM package, execute the following command:
sudo dpkg -i mysql_8.4.2-6_amd64.deb
Install RPM package without Conversion
To install the RPM package on Ubuntu 24.04 without conversion, you can use the following command:
sudo alien -i google-chrome-stable_current_x86_64.rpm
Conclusion
You can use the examples above to install an RPM package on Ubuntu 24.04, but be aware that installing packages not initially designed for the current system may fail or cause incompatibilities with other software on your server. However, it is worth trying to install them this way.
That’s it. You successfully installed the RPM packages on Ubuntu 24.04.
Of course, you don’t have to install it on your own if you have difficulties and you are not familiar with Linux. You can always contact our technical support. You only need to sign up for one of our NVMe VPS plans and submit a support ticket. We are available 24/7 and will attend to your request promptly.
If you liked this post about installing RPM Packages on Ubuntu 24.04, please share it with your friends or leave a comment down below.