Converting .rpm Packages To Debian/Ubuntu .deb Format With Alien
Author: Falko Timme
Last edited 10/22/2006
This article shows how you can convert .rpm packages to .deb packages with a tool called alien so that you can easily install them on Debian and Ubuntu systems. Sometimes this is quite convenient as not all software projects release their software as Debian/Ubuntu packages.
For example, I recently wrote a tutorial about MySQL Backup And Recovery With mysql-zrm On Debian Sarge. In that tutorial I had to install mysql-zrm from the sources because the developers had released an .rpm and a source package, but no .deb package. The installation was a little bit painful because there were no installation instructions for the source package. Now, with alien I can just convert the .rpm file to a .deb file and simply install that one.
However, you should keep in mind what the alien man page says:
"alien should not be used to replace important system packages, like init, libc, or other things that are essential for the functioning of your system. Many of these packages are set up differently by the different distributions, and packages from the different distributions cannot be used interchangeably. In general, if you can't remove a package without breaking your system, don't try to replace it with an alien version."
1 Preliminary Note
In this example I use a Debian Sarge system, and I will show how to convert the mysql-zrm rpm package to a .deb file and install that one. The procedure is the same for Ubuntu.
2 Alien Installation
Alien is available in the normal Debian repositories, so we can install it like this:
apt-get install alien
3 Converting .rpm To .deb
Next we download the current mysql-zrm rpm package (1.1-1 at the time of this writing):
To convert it into a .deb package, we simply run
in the /tmp directory, and you'll see that alien has created the file mysql-zrm_1.1-2_all.deb. You'll also notice that alien has counted up the version number, it's now 1.1-2 instead of 1.1-1. If you want to keep the original version number, you must use the -k switch:
alien -k MySQL-zrm-1.1-1.noarch.rpm
will create the file mysql-zrm_1.1-1_all.deb.
To install the new .deb file, we use dpkg -i:
dpkg -i mysql-zrm_1.1-1_all.deb
Now mysql-zrm is installed and fully functional (you still might have to edit its configuration file though).
If you want to save the dpkg -i step, you can have alien install the package. The command
alien -i MySQL-zrm-1.1-1.noarch.rpm
would convert the original rpm package and immediately install it.
You see, converting .rpm files to .deb files is very easy. You can have a look at
to learn about what else you can do with alien.
- Alien: http://kitenet.net/~joey/code/alien.html
- Debian: http://www.debian.org
- Ubuntu: http://www.ubuntu.com