How to install .rpm on Ubuntu?

mpalencia picture mpalencia · Jan 30, 2015 · Viewed 82.1k times · Source

I am an ubuntu user, however I need to install a printer driver which is a RPM (*.rpm) file (Sorry it's the only driver available from the Manufacturer site for Linux).

Is it possible to install RPM files on ubuntu?

Thanks in advance.

Answer

Xen2050 picture Xen2050 · Jan 30, 2015

From https://help.ubuntu.com/community/RPM/AlienHowto , use the alien package:

Alien converts an RPM package file into a Debian package file or Alien can install an RPM file directly. This is not the recommended way to install software packages in Ubuntu. If at all possible, install packages from Ubuntu's repositories using Add/Remove, apt-get, or the Synaptic Package Manager. Package dependency conflicts may occur when attempting to install RPM packages.

These commands should do it:

sudo apt-get install alien
sudo alien -i package_file.rpm

And from alien's man page :

WARNING

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.