Once in a while, you’ll come across a piece software that’s only in RPM format. It’s possible to convert RPM to DEB and you may be able to install that software on your DEB-based system.
You’ll find that it’s not unusual to come across software packaged in a format that you can’t use. That’s just the name of the game. Developers and package maintainers are going to concentrate on the stuff they themselves use. It’s not selfishness that prevents them from packaging it in different formats, it’s just a matter of time and priorities.
It’s times like these when you can use a nifty little tool called ‘alien‘. Alien has been around for a long time and is really useful. It can actually be used in both directions, converting between .deb and .rpm interchangeably.
Convert With ‘alien’
So, let’s get started. This won’t take very long and will be a valuable tool for your tool-chest. If you don’t need it today, put it aside for a future date. As you progress along your Learning Linux Journey, it may well prove valuable.
As you know, the tool we’ll be using is ‘alien’ and the man-page defines it as this:
alien – Convert or install an alien binary package
You’ll install it with your package manager. As we’re using an apt-based system, we’ll be using apt to install the software. Crack open your terminal with
1 | sudo apt install alien |
That’s going to pull in quite a few dependencies. On a stock Lubuntu installation, it pulls in about 200 MB worth dependencies, so you should be aware of this.
Now that you have it installed, there are a couple of ways you are most likely to use it. The first, given that we’re talking about Debian/Ubuntu/derivatives, would be converting an .rpm to a .deb. That’s pretty easy. Just do this:
1 | sudo alien <package-name>.rpm |
That will convert the package to .deb and you can install it in the normal ways. Seeing as you’re right there in the terminal already, you can just use:
1 | sudo apt install <new-package-name>.deb |
You can skip all that and do the conversion and installation all at the same time. To do this, you simply use the -i switch. It looks like this:
1 | sudo alien -i <package-name>.rpm |
NOTE: This won’t always work. The package you converted may not work, usually due to dependencies that can’t be satisfied. If it doesn’t work, you’ll have to look for other solutions.
If you want to go the other direction, you can use this:
1 | sudo alien --to-rpm <package-name>.deb |
There are other ways to use alien, but those are the most common ways that I see it being used – and the ways I’ve historically used it. It has been effective most of the times I’ve tried it, but I am just a single data point and anecdotes aren’t really data.
If you’re interested in other uses (such as tgz or slp), you can consult the man-page or read the online man page. It’s a fairly versatile application and one that all Linux users should know about.
Once again, thanks for reading. Don’t forget that there’s a newsletter and that you can now donate to help cover any hosting costs. If you want to contribute, there are all sorts of ways that you can help – just let me know.
Last Updated on April 27, 2021 by KGIII