The problem with Linux packages
Software and package distribution on Linux has always been extremely fragmented, primarily because of the multiplicity of package managers like apt, yum, and pacman and app image solutions available to a user. This is because Linux distributions follow their own philosophy and as a result, will end up using a certain package manager over the other based on the type of distribution. For example; Debian systems utilize the dpkg (Debian Package Management System), whereas Arch-based systems primarily use pacman. This is one of the primary gripes new Linux users have with the ecosystem, “How can I install a package designed for another system on my system?” The purpose of this guide is to demonstrate how you can convert and install packages designed for another Linux distribution on your distribution.
The Alien Utility
alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another Linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.
Converting RPM to DPKG
For this particular example, our host OS will be Ubuntu and we will be converting the Google Chrome RPM package to a DEB package.
After we have downloaded the RPM package, we can now install the alien utility. This can be done by using the aptitude package manager on Ubuntu/Debian.
sudo apt update && sudo apt install alien
After the alien utility is installed you can access the man pages for the utility by running the following command:
Or, alternatively, you can access the documentation/man pages by visiting the following link: https://manpages.ubuntu.com/manpages/bionic/man1/alien.1p.html
We can now begin the package conversion process, the first step is to navigate to our Downloads directory and assign executable permissions to the RPM package.
After we have assigned the relevant permissions, we can now convert the package from RPM to DEB by running the following command as root.
sudo alien --to-deb <package>
This will begin the conversion process, in this case, we are converting the Google Chrome RPM package to a Debian package that we can then install.
After the package has been converted, we will now be presented with a new .DEB package, that we can install with pkg. This can be done by running the following command with root privileges:
sudo dpkg -i <package>
As you can see, we were successfully able to convert an RPM package to a DEB package and install it without any hitches. The alien utility can be very useful in converting packages that might not be available for your distribution.