- dotTech - http://dottech.org -

How to make Ubuntu programs (packages) run on Fedora [Guide]

6783300642_5c8d33e1e6_z [1]Frustrated that as a Fedora user you sometimes have to deal with developers neglecting you? Annoyed by having to compile certain packages from source because only an Ubuntu .deb package is available? Say no more. Once you’ve learned how Alien [2]works, you won’t need to worry about getting stuck with just a .deb file. Let’s get started!

Before We Begin

Before we get started, the RPM Fusion will need to be enabled on you system (if it isn’t already). Open a terminal window and enter the command below and the RPM  Fusion repository will be installed and enabled.

sudo -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'

After entering the command above to enable the RPM Fusion repository, leave the terminal window open.

This guide is done by using a terminal program called Alien.

-r Stands for converting a package to a Red Hat rpm package.

-v Stands for verbose (Alien will display each command that it’s executing on the screen). This will help in troubleshooting if a package refuses to convert.

-c Stands for the option to keep all the scripts that are located in the package you are trying to convert.

Some packages will refuse to convert. This is unavoidable. Alien is not a perfect solution.

Alien can convert many package formats and is usable on Arch Linux, Ubuntu, OpenSUSE (as well as other Red Hat based distros), Slackware and even Solaris. This guide covers converting Ubuntu/Debian .deb packages to Fedora/Red Hat .rpm packages, but the same process can be done with many other operating systems. If you’re interested in finding out how, run the command alien --help in your terminal window.

How To Convert Ubuntu Packages To Fedora Packages

sudo yum install alien -y

wget http://github.com/downloads/djmelik/archey/archey-0.2.8.deb 

sudo alien archey-0.2.8.deb -r -v -c

[derrik@ ~]$ sudo alien archey-0.2.8.deb -r -v -c
[sudo] password for derrik:
dpkg-deb --info 'archey-0.2.8.deb' control 2>/dev/null
dpkg-deb --info 'archey-0.2.8.deb' control 2>/dev/null
dpkg-deb --info 'archey-0.2.8.deb' conffiles 2>/dev/null
dpkg-deb --fsys-tarfile 'archey-0.2.8.deb' | tar tf -
dpkg-deb --info 'archey-0.2.8.deb' postinst 2>/dev/null
dpkg-deb --info 'archey-0.2.8.deb' postrm 2>/dev/null
dpkg-deb --info 'archey-0.2.8.deb' preinst 2>/dev/null
dpkg-deb --info 'archey-0.2.8.deb' prerm 2>/dev/null
mkdir archey-0.2.8
chmod 755 archey-0.2.8
dpkg-deb -x archey-0.2.8.deb archey-0.2.8
rpm --showrc
cd archey-0.2.8; rpmbuild --buildroot='/home/derrik/archey-0.2.8' -bb --target noarch 'archey-0.2.8-2.spec' 2>&1
archey-0.2.8-2.noarch.rpm generated

Done!

Conclusion

Using a Linux distribution that does not have as much of a selection of packages can be frustrating. Hopefully after mastering package conversion with Alien, you can learn to love your distribution of choice again.