Sunday, September 26, 2010

Package Management in Linux

Package management in Linux has come a long way. Not so long ago installing software in Linux was a nightmare. But these days it becomes a smooth ride in most cases because of excellent software tools (package managers) available in different distributions. Red Has has up2date, Fedora has yum, Debian/Ubuntu has apt-get, openSUSE has Yast2, zypper. To some people Yast2 is the most powerful tool available.


Packages are found in two different formats - Source & Binary. Source packages with tar, gz  extension and binary packages comes with deb, rpm extension. The same source format can be installed in all Linux distribution but binary formats are for specific distributions.
  • RPM - Red Hat, Fedora, openSUSE
  • DEB - Debian, Ubuntu (or any distribution based on Debian/Ubuntu like Mint)

On modern Linux distributions, software installation is best done with a package manager. A Package Manager is an application that is able to install, update and remove packages. Package Managers put an additional layer on top of the low-level tools such as rpm, typically providing the following additional capabilities:
  • download and refresh metadata from several repositories, to know where to find what
  • resolve package dependencies
  • detect and display newer versions of packages that are available in repositories
  • search for packages in repositories
rpm itself is usually not referred to as a Package Manager, as it only provides low-level operations on packages and is not able to resolve dependencies by downloading required additional packages.

Note that unless you really know what you are doing, you should never install packages using low-level tools such as rpm (or dpkg on Debian based distributions) but always use a package manager instead.

Package Managers of different Linux Distributions

You should only install binary's that are built specifically for your version. A package is properly integrated into the distribution it has been built for, with regard to installation paths, dependencies, desktop integration, proper startup scripts for servers, etc. For this reasons, one should always install packages that have been built for the distribution, including the exact version of the distribution (e.g. openSUSE 11.3). As an example, do not install Fedora packages on openSUSE, and not even openSUSE 11.2 packages on openSUSE 11.3 (although the latter might work, occasionally).

openSUSE's official website has an nice article about the basics of 'Package Management'. You can check it out here.

Related Links
Package Management in openSUSE for Newcomers @ openSUSE Community
Package Management @ openSUSE Wiki
Package Management System @ Wikipedia

No comments:

Post a Comment