Ubuntu|Installing using an RPM file
Installing using an RPM file September 23, 2005
Posted by Carthik in administration, applications, ubuntu.trackback
If you have an rpm file for a package you wish to install, and if you cannot find a .deb debian package in any of the Ubuntu repositories or elsewhere, you can use the alien package converter application to install the .rpm file.
Alien is a program that converts between the rpm, dpkg, 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.
Despite the large version number, alien is still (and will probably always be) rather experimental software. It has been used by many people for many years, but there are still many bugs and limitations.
Alien should not be used to replace important system packages, like sysvinit, shared libraries, or other things that are essential for the functioning of your system. Many of these packages are set up differently by Debian and Red Hat, and packages from the different distributions cannot be used interchangably. In general, if you can't uninstall the package without breaking your system, don't try to replace it with an alien version.
Instructions for Installing RPM Files Using Alien
Installing Alien
You can install alien itself from the Ubuntu Universe repository by adding the repository to your list of sources and doing:
$sudo apt-get update
$sudo apt-get install alien
Installing the .rpm file
To install the .rpm file, you first need to convert it to a .deb file which can be installed on Ubuntu.
I assume that you downloaded the package to your Desktop (~/Desktop is the directory)
You can convert the .rpm to a .deb by using the following commands.
$cd ~/Desktop
-This will change the directory to your desktop, where you have the .rpm file.
$sudo alien -k name-of-rpm-file.rpm
- This will convert the .rpm to a .deb.
- The "-k" will keep the version number. Otherwise alien adds a "1″ to the version number.
- Tip: Use Smart Tab Completion to avoid mistyping the file names
$sudo dpkg -i name-of-deb-file.deb
- This will install the .deb package
Try reading the alien manpage for more details on how to convert other kinds of packages and the options available.
Install an RPM Package on Ubuntu Linux
Installing software on Ubuntu usually entails using Synaptic or by using an apt-get command from the terminal. Unfortunately, there are still a number of packages out there that are only distributed in RPM format.
There's a utility called Alien that converts packages from one format to the other. This doesn't always mean that an rpm will work on your system, though. You will need to install some prerequisite software packages in order to install alien, however. These packages include gcc and make.
Run this command to install alien and other necessary packages:
sudo apt-get install alien dpkg-dev debhelper build-essential
To convert a package from rpm to debian format, use this command syntax. The sudo may not be necessary, but we'll include it just in case.
sudo alien packagename.rpm
To install the package, you'll use the dpkg utility, which is the internal package management tool behind debian and Ubuntu.
sudo dpkg -i packagename.deb
The package should now be installed, providing it's compatible with your system.