106

I have a burning desire to install RPMs onto my Ubuntu installation - is this possible? Can I use Yum - or another RPM Package Management tool?

3
  • Why? What kind of software are you missing that you can't find in Ubuntu or the PPAs? Converting rpms with alien works, but it's really not the best option.
    – raphink
    Aug 24, 2010 at 7:08
  • In my day job I'm a linux System Administrator and I administer mainly Redhat machines. I love Ubuntu in that I don't have to take my job home with me, but some things that Debian uses for configuration (mainly Apache) really drive me nuts. I much rather prefer the way RH maintains the apache software. So maintaining two package management solutions (yum and aptitude) seems like a more ideal solution (if it's possible) Sep 2, 2010 at 1:00
  • Related information: rpm and yum tag wikis. Dec 27, 2012 at 13:15

11 Answers 11

141

Can I use Yum

I wouldn't recommend it. You probably could compile it but you wouldn't have any Ubuntu-compatible package repositories for it to handle.

You can convert single RPM files into DEBs with Alien:

sudo apt-get install alien
sudo alien my_package.rpm
sudo dpkg -i my_package.deb

Note: It might change the filename a little more than just the extension.

This won't work for everything as packages link to other packages to fulfil dependencies. Obviously Red Hat/Fedora/CentOS use different package names to Ubuntu so you're likely going to run into a whole load of pain.

Chances are if a DEB doesn't exist, you'll be better off just getting the source and compiling it.

5
  • 3
    if alien doesn't work and you do end up using the source code directly, you can turn that into a .deb using checkinstall (which is in the universe repository, not installed by default). Aug 23, 2010 at 22:52
  • Checkinstall is used in place of make install and is very handy to have around. Being able to remove packages is definitely a plus!
    – aperson
    Aug 24, 2010 at 10:49
  • checkinstall is great for maintaining a self-build in a packaged environment but it does have some quirks that sometimes mean something that will install through make install won't install. I use it when I can.
    – Oli
    Aug 24, 2010 at 11:00
  • 3
    you can do alien --install my_package.rpm.
    – tshepang
    Oct 29, 2010 at 19:11
  • I tried to install the newest version of lftp this way, but it didn't update the dependencies, so lftp fails to start trying to load with: error while loading shared libraries: libreadline.so.7 Mar 6, 2018 at 10:03
17

You will need alien to do that.

sudo apt-get install alien

This will install all the required packages.Now you can start converting your .rpm files to .deb packages.

Available Options for alien:

Convert the package.rpm into a package.deb

sudo alien -d package-name.rpm

Convert the package.rpm into a package.deb, and install the generated package.

alien -i package-name.rpm

If you want to keep alien from changing the version number use the following command

alien -k rpm-package-file.rpm
9

The short answer is, Don't!

If you got an RPM that is so important that you need to have it, there is probably a Ubuntu package as well; and, if not, it is probably worth going through the trouble of compiling it from source into the Debian package format (that Ubuntu uses as well). Now, there are certain times when you can't just recompile the software (if it's not opensource it's impossible) and in that case you can use the alien program. But, installing from RPM's is a little like putting gasoline in a diesel car - it might work, but you wont benefit from it in the long run!

To build a package from source, there is a guide on the Ubuntu Wiki; there is also a program called checkinstall that can do some tricks with a default source-tree without setting up build instructions for the package. If you think that someone else can benefit from the programs that you compile, you can setup a repository on launchpad and share the package goodness!

1
  • 2
    not really answer to the question, so -1
    – Dee
    Jul 26, 2017 at 14:03
3

If you really need to install RPMs on your system you should indeed try to convert them using 'alien'.

Please keep in mind that by default 'alien' will meddle with the version number of the package. If you want the version number to stay the same, pass the option '-k' when converting.

You should not try to use Yum or any other way of installing the RPMs, such as apt-rpm, themselves next to the existing DEB packages. The DEB and RPM systems manage the list of installed software separately and therefore don't know what packages were installed previously by the other system. If, e.g., you'd try to install a GUI-bearing application with an RPM-based package management system, it'll try to install vital system components itself, because it thinks they are not installed yet. This will either cause the installation to fail horribly, or overwrite vital system files.

3

Theres a GUI package manager named SmartPM on the Repos, it can handle .deb AND .RPM. Canonical contributed to this project up to November 2009.

The projects home page is here https://github.com/smartpm/smart

1
  • Welcome to Ask Ubuntu! I recommend editing this answer to expand it with specific details about how use do this. (See also How do I write a good answer? for general advice about what sorts of answers are considered most valuable on Ask Ubuntu.) Jan 7, 2016 at 11:38
2

Alien is a tool that convert from one format(.deb or .rpm) to another (.deb, .rpm or tarball)

Alien is not advised to use in converting from .deb to .rpm its perfect to use in converting .deb to tarballs

Althought Alien attempts to preserve meta-data when converting but it will still have Metadata & dependency problems make package less reliable and thus will conflicts ehen adding or removing distirbution packages in the future.

2

Actually shortest option is

sudo alien -i -k packagename.rpm

Don't have an alien? Get one!

sudo apt-get install alien

Alien will convert rpm package into deb package, the -i option means install the converted package after is converted and the -k option ensure version is not +1 after conversion.

2

Follow these instructions:

alien -k avg71lms-r30-a0782.i386.rpm

Now you should be having avg71lms-r30-a0782.i386.deb file.

To install .deb file:

dpkg -i avg71lms-r30-a0782.i386.deb

If you don't use -k option you should see avg71lms_r30-1_i386.deb file the difference is it will add 1.

Install alien in Ubuntu:

sudo apt-get install alien

You can check the above section for available options

1

With alien I can just convert the .rpm file to a .deb file and simply install that one.

Alien is available in the normal Debian repositories, so we can install it like this:

sudo apt-get install alien

To convert it into a .deb package, we simply run

alien *.rpm
1
  • You most likely want to use some flags with alien. At the least, it will warn you about not converting the scripts without explicitly specifying --scripts (or -c)
    – Randall
    Feb 1, 2017 at 18:27
0

use alien which converts the rpm to deb and subsequently installs the deb.

1
  • Welcome to Ask Ubuntu! I recommend editing this answer to expand it with specific details about how to do this. (See also How do I write a good answer? for general advice about what sorts of answers are considered most valuable on Ask Ubuntu.) Jan 7, 2016 at 11:37
0

Here is a GUI for Alien (alien is an application to convert rpm to deb)

http://code.google.com/p/foxoman/wiki/PackageConverter

3
  • -1 What's "Alien" and how is it related to the installation of RPMs in Ubuntu? Jan 7, 2016 at 11:38
  • 1
    @DavidFoerster alien is an application to convert rpm to deb
    – Anwar
    Sep 20, 2016 at 6:19
  • 2
    Don't tell me, edit your answer to tell the people who might want to benefit from it. Furthermore I recommend editing this answer to expand it with specific details about how to do this. (See also How do I write a good answer? for general advice about what sorts of answers are considered most valuable on Ask Ubuntu.) Sep 20, 2016 at 9:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .