How to install DEB on RedHat/Centos & RPM on Debian/Ubuntu with Alien

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

Introduction

There are packages in repositories and GitHub that are ready to use most of the time. But sometimes packages are not available in binaries (ready to install on the go). So we have to download the source code and build it from scratch. It is not an issue if you have time but for increasing Productivity. Here is where Alien comes into place.

Alien is really designed to convert from alien file formats to the packaging format. Of course, it can also convert from your distribution’s native format to alien formats or from one alien format to another. Be warned, that if these latter types of conversions are done. The generated packages may have incorrect dependency information. For example, this is true if you convert an rpm into a deb on a Red Hat system. Even with alien-extra installed. Dpkg will be unable to calculate library dependencies for the deb correctly. Instead, it creates, and you will get a package without any library dependencies.

To use alien, you will need several other programs. Alien is a Perl program and requires Perl version 5.004 or more significant. If you use Slackware, make sure you get Perl 5.004, the Perl 5.003 in Slackware does not work with Alien!

To convert packages to or from RPMs, you need the Red Hat Package Manager;
get it from Red Hat’s FTP site. If your distribution (e.g., Red Hat)
provides an rpm-build package. You will need it as well to generate RPMs.

If you want to convert packages into Debian packages, you will need the
dpkg, dpkg-dev, and debhelper (version 3 or above) packages, which are

Installing Alien

Sync all repositories connected to the server. Also, check flectra for Ubuntu 20.

Now install package

# apt install alien -y

Download the package you want to convert

For testing, we will use Nmap. Follow the command below. You can download it from this mirrorsite.

# wget http://centos.mirror.liquidtelecom.com/7.9.2009/os/x86_64/Packages/nmap-6.40-19.el7.x86_64.rpm

Generate the nmap version for Ubuntu/Debian

Follow the command below.

# alien nmap-6.40-19.el7.x86_64.rpm

Install the generated package from Alien to the system

Follow the basic dpkg command used for Ubuntu.

# dpkg -i nmap_6.40-20_amd64.deb

Conclusion

Maybe a simple and easy way to use. However, we don’t know the implications as we developed and install future packages. Beter educational and for testing purposes. I don’t recommend this in production with which we need everything to be stable.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
Mel
Melhttps://unixcop.com
Unix/Linux Guru and FOSS supporter

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook