How to install *.rpm files in Ubuntu

UbuntuUbuntu (and all Debian based) distributions use the .deb format for application packages and these days most developers writing applications for Linux provide a .deb package.

But, even then there might be times when you want to install an application which is available only in the .rpm format. If you use Ubuntu or any other Debian distribution, Alien might be able to help you.

Alien is a program that converts between the rpm, dep, stampede slp, and slackware tgz file formats. If you want to use a package from another distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it.

Alien is available in the Ubuntu repository so you can install it by using the following command

$ sudo apt-get install alien

To convert an rpm file to deb, use the following command

$ alien -d -k package.rpm

Where package.rpm is the rpm package that you want to convert. The ‘-k’ option is to tell alien to keep the same version number on the resulting .deb as the rpm file.

Alien can also convert .deb packages to .rpm and the command to do that is

$ alien -r package.deb

Where package.deb is the deb package that you want to convert.