An app required me to install RPM package to install .rpm files. But as far as I know, there is another software called "alien". What is the difference between this two? I couldn't manage to find on search engines.
4 Answers
First, to address your situation:
Most of the time when an application is provided as an RPM package, it is also provided in some other way that is more likely to work on Ubuntu. As you may know, Ubuntu uses DEB packages. It's possible to (attempt to) install an RPM package on Ubuntu, but RPM packages are really intended for systems that use RPM as their package manager, like Fedora, CentOS, Mandriva, and Mageia (that's a far from complete list).
Therefore, you should try to find a DEB package for the software. If there isn't one, then you should try to find a system-agnostic binary installer (which won't necessarily be named ending in .run
), or compile the application from source (see also this guide).
If those options aren't available either or you want to try installing from an RPM package anyway (for example, if you've heard that for this particular software the RPM package will work on Ubuntu), read on...
rpm
vs. alien
dpkg
(WP) is Ubuntu's package manager.
The surrounding infrastructure, such as APT, the Software Center, and the Software Updater, which automatically check for and fetch packages from software sources, may also be considered "the package manager," but dpkg
is what installs and uninstalls packages and keeps track of what packages are installed at what versions (often being called behind the scenes by other utilities to perform these functions).
rpm
(WP) is another, separate package manager. Where Ubuntu uses dpkg
, some other OSes use rpm
. It's possible to use multiple package managers on the same system, and you can run rpm
on Ubuntu. But generally speaking, when you (try to) install an rpm
package on an Ubuntu system, you don't gain most of the benefits of using package management, because "this package depends on that package" relationships are generally neither determined nor respected across multiple package managers. That is, if there is a dependency or conflict that would require dpkg
(and the surrounding infrastructure) to install, remove, upgrade, or perform some other action with a package, rpm
will not know that, and rpm
will not trigger that.
alien
(WP) is a utility that attempts to convert a .rpm
package into a .deb
package that can be installed on your system, with the hope that it will integrate properly into the dpkg
-based package management system. Optionally, alien
can also automatically attempt to install that file. (More generally, alien
can perform conversions the other way, and supports some other package formats too, besides .deb
and .rpm
.)
In practice, as Call me V says, installing .rpm
packages with alien
often doesn't tend to work very well. Certainly not as well as if the software's developer made a .deb
package. But it's usually better to use alien
to install an .rpm
package on Ubuntu, than to try to install it using the rpm
utility.
Of course, if alien
fails or the installed package doesn't work properly, you can always try uninstalling it and then installing the .rpm
package with rpm
. Or as bodhi.zazen explains, you can try manually extracting files from an .rpm
package and copying them to the necessary locations.
How to use them:
If you have a package called foo.rpm
in the current directory (i.e., you have cd
'd to the directory that contains it) and want to use alien
to create and attempt to install a .deb
package from it, you could run:
sudo alien -di foo.rpm
If you wanted to try to install foo.rpm
directly with rpm
, you could run:
rpm -i foo.rpm
Further Reading
For more information, see the alien
and rpm
manual pages, and the alien and rpm websites.
See also our rpm
tag wiki (which also includes information about alien
).
-
Thanks for long and descriptive description. But, why some software is not available as DEB, but RPM? Is there any legal problems or they do not release on purpose. For example, Flash player can't be downloaded from Adobe website as DEB, but RPM. Intel compiler is the same...– wakeupJul 19, 2013 at 17:54
-
@wakeup I am not aware of any general DEB-specific legal problems. When software is packaged for one package management system and not another, this reflects what work the people packaging it have decided to do (and have completed so far). There's lots of free open source software that could be packaged in any format but isn't. However, for proprietary software that would often be illegal for anyone but the copyright holder to package and distribute (without their permission), it's as you say--for example, if we were allowed distribute a DEB package directly containing Adobe Flash, we would. Jul 20, 2013 at 1:48
Packages are made from source code and are used to install the compiled applications (typically). The source code can be processed (packaged) in a variety of ways and is used by your package management system to install the package (if that makes sense).
Each distro uses a packaging system and naming convention, Ubuntu and Debian use .deb (apt). Fedora (RHEL, Centos, SUSE) use .rpm.
See the various packaging guides for details.
http://developer.ubuntu.com/packaging/html/
http://fedoraproject.org/wiki/Packaging:Guidelines
Alien is an application that attempts to convert one package format (.rpm) to another (.deb). There are options beyond .deb and .rpm as well, but that is a little beyond this question.
See: http://manpages.ubuntu.com/manpages/raring/man1/alien.1p.html
The problem is that although a package might be called the same, say "firefox", due to naming conventions, the libraries within and across packages may not be named the same between various distributions or may be incompatible across distributions. Even if they have the same name they may not be identical. Some libs are symbolic links. In addition, packaging may include pre/post installation scripts and/or configuration files. The installation scripts might not be easily converted (by alien). The configuration files might be different (for example init or boot scripts).
Alien therefore may work for "simple" packages, but often fails or is error prone for more complex packages.
If you need to install a package, imo, you are better off either extracting the .rpm or compiling from source.
The .rpm is an archive, like a zip file, and the contents can be extracted, reviewed, and manually installed.
http://www.cyberciti.biz/tips/how-to-extract-an-rpm-package-without-installing-it.html
You extract the files, and manually copy them to the appropriate location in your system.
See also: https://fedoraproject.org/wiki/Package_management_system
-
It's somewhat misleading to say that source code is packaged. (It is, but that produces source packages, not the kind of packages you're probably talking about.) Source code is compiled, and the result is packaged. Jul 19, 2013 at 4:34
-
My post is a bit of an over simplification. You can make a .deb without compiling anything, a .deb for background images for example.– PantherJul 19, 2013 at 12:39
alien tries to convert rpms to debs. which means it tries to make native packaging work. unfortunately it's a lot like a half-witted translator. which means that at least half the time you'll get the wrong translation.
essentially this means that, while alien is an epic attempt at awesome, you will have varied results using it to get rpms under deb file management.
RPM is the package format for Red Hat derived distributions.
Alien is an application that convert between RPM and DEB packages. The converted package may or may not work in your system.
You can find more info about both package formats and alien in this pdf. TBOL_2011_1_RPM_DEM_US.pdf
Now the other issue. You are trying to install a RPM based package on your Ubuntu I guess. Well that's not a good idea. You should try in the program site, or app developer to find if there is an Ubuntu/Debian package and try that instead, or a universal Linux package (usually end in .run), or compile from sources.