GNU/Linux software package management is quite diverse. This is, of course, related to the different architecture of the operating systems. Somewhere there are installation files with a specific extension (like .exe or .msi in Windows), and somewhere installation takes place directly from the source. This article will discuss how to install deb and rpm files and their management systems in Ubuntu, Red Hat and others.
Files of this type have the .deb extension. This archive, created by ar, contains executable scripts, libraries, configuration files, and metadata. It is an approximate analog (because it does not always come with all the necessary components for full functioning) of .exe and .msi files in Windows.
Distributed in Debian-based distributions (hence the name of the extension). The dpkg system manages such packages in the terminal. There are also graphical installation options when using a utility like gdebi (in this case, the download of additional components is guaranteed).
- prioritization of packages;
- hints on recommended components;
- no support for file dependencies;
- no patch technology to save traffic.
A file with the .rpm extension is also an archive with similar content but packaged, by default, using cpio (lzma and xz are also used). It differs from a regular archive by a record identifying it as an rpm file and a signature verifying the authenticity of the archive.
It is managed by the eponymous program―RPM. Initially distributed only in Red Hat, then moved to subsidiary distributions (CentOS, Fedora) and not only (openSUSE, OpenMandriva).
- component dependencies are eliminated mainly automatically;
- there is no dependence on other packages installed in the OS;
- no hints on recommended packages;
- it is possible to check the hash amount of any installed software;
- support for scriptlets;
- support for multilib components.
What’s Common Between deb and rpm?
These files have little in common. Basically, they are similar only by the ability to convert from one format to another, for example, using the alien utility. This is possible due to the fact that these archives do not depend on the architecture used.
Managing deb and rpm Packages
The syntax for managing these archives is similar across distributions. The following is a comparative table of some of the commands:
|Install||dpkg –install PACKAGE.deb||rpm –install PACKAGE.rpm|
|Update||same as install||rpm –upgrade PACKAGE.rpm|
|Uninstall||dpkg –remove PACKAGE||rpm –erase PACKAGE|
|Verify||dpkg –verify PACKAGE.deb||rpm –verify PACKAGE.rpm|
You can read more about dpkg and rpm in the corresponding man help documentation.