How to install deb file in RHEL 8 / CentOS 8 Linux - LinuxConfig.org
How to install deb file in RHEL 8 / CentOS 8 Linux
There may come a time when that package you want to install in RHEL 8 / CentOS 8 is simply not available as a RPM file. The alternative is to download the source and compile it yourself, or - alternatively - generate a RPM file from that source code later on. But there is another way. Given the fact that Debian-based distributions have way more users than RPM-based ones, the number of available packages in their repositories is greater. Chances are you will be able to find a DEB file for that package you want. Here is how to install that DEB file in RedHat Linux with the help of a small utility called alien.
In this tutorial you will learn:
- How to install alien in RHEL 8 / CentOS 8
- How to convert a DEB package to a RPM one
File conversion with alien doesnโt take long.
**Software Requirements and Conventions Used
Installing alien
Alien is a tool for converting between various package formats. It currently supports conversion to and from RPM, DEB, Stampede SLP, LSB, Slackware TGZ packages and Solaris PKG files. Download alien with
$ wget -c https://sourceforge.net/projects/alien-pkg-convert/files/release/alien_8.95.tar.xz
and unpack the archive:
$ tar xf alien_8.95.tar.xz
Alien uses Perl so you will need it to compile the source. Install Perl with
# dnf install perl
if it isnโt already installed. Then you can go on and compile the alien source code in the freshly unpacked directory with
# perl Makefile.PL; make; make install
Converting DEB packages to RPM
Once alien is installed using it is simple. To convert a Debian package to RPM format use
# alien --to-rpm file.deb
where file.deb is the DEB package you have downloaded. This will generate a RPM equivalent for that DEB file that you can install with
# rpm -ivh file.rpm
Conclusion
The alien utility is not failproof. It works great for small packages that donโt have many dependencies but it may encounter problems converting larger packages such as the entire KDE suite or LibreOffice. It is however a quick way to get your hands on the RPM version of a Debian file.