One of our earlier articles has already covered the basic usage of
alien to convert from .deb to rpm formats. While Alien is a great tool that offers RPM distro users access to the vastly more extensive DEB packages, its uses are not limited to deb-to-rpm conversions.
The tool itself is capable of much more than that. Besides its more advanced functionality at a basic level, alien can convert any of the below packaging formats:
- DEB – the well-known Debian package format that all Debian derivatives, therefore the whole Ubuntu family, use. Possibly the most broadly used packaging system on Linux
- RPM – DedHat’s own aproach to packaging, used by RHL, Fedora, CentOS, Mageia, OpenSUSE and many others
- SLP – the Stampede Linux Packaging format. This is an interesting addition, as Stampede Linux has only been active between 1997 and 2002, never gaining mainstream popularity or becoming a “base distro” like others, despite its really forward-looking development approach back in 1997
- LSB – Attempt to create a fully LSB-compliant RPM package, although as the alien man page states, “No guarantees are made that the generated lsb packages will be fully LSB compliant, and it’s rather unlikely they will unless you build them in the lsbdev environment.”
- TGZ – tar, or tar.gz archives. Converting from these archives will only work if it contains binaries. (It will not work on source-code archives, in other words.)
From 32- to 64-bit
When working on a 64-bit system, you might come across 32-bit RPM packages that you would like to convert to DEB (or the other way around). In such cases, alien will most likely throw an error.
Attempting to convert the 32-bit RPM file on a 64-bit Debian system will result in the error “.rpm is for architecture i386; the package cannot be built on this system.”
The solution is a little workaround. You can use alien’s capability to convert into simply TGZ archives, as an intermediary.
For this you would use the
-t switch (or
then convert from tgz to DEB. This needs no additional switch, as converting to DEB is the standard behaviour.
Alien has the capability to smoothly convert between different packaging formats. Although 32-bit package conversions on 64-bit systems might seem impossible, with a little workaround, it simply becomes a two-step process. A little more inconvenient, yet still straightforward and easy, this simple trick will allow you to convert 32-bit RPM packages into DEB, even on 64-bit systems.