How to Convert 32 Bit RPM Packages to DEB on a 64 Bit System

Spread the love

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 --to-tgz). Use

sudo alien -ct somepackage.rpm

or

sudo alien -c --to-tgz somepackage.rpm

then convert from tgz to DEB. This needs no additional switch, as converting to DEB is the standard behaviour.

sudo alien -c somepackage.tgz

Conclusion

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.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.
By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time. Subscribe


Attila Orosz

Attila is a writer, blogger and author with a background in IT management. Using GNU/Linux systems both personally and professionally, his advice stems from 10+ years of hands on experience. In his free time he also runs the popular Meditation for Beginners blog.

Comments (2)