Skip to content Skip to navigation

Connexions

You are here: Home » Content » Package Management

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

      What are tags? tag icon

      Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

    • External bookmarks
  • E-mail the author
  • Rate this module (How does the rating system work?)

    Rating system

    Ratings

    Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

    How to rate a module

    Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

    (0 ratings)

Recently Viewed

This feature requires Javascript to be enabled.

Package Management

Module by: Algis Rudys

Summary: This module provides an overview of packages and application packaging for Linux. It covers RPM and Dpkg format, as well as the Apt tool. It also discusses compiling a package from source.

Packages are groups of files which are used by the same program or subsystem. They are generally distributed in some archive format (such as zip or tar). A package management system is a system which allows such packages to be installed, removed, and configured as a unit.

There are several mechanisms for managing packages installed in a Linux system. By far the most common is RPM. This is a package format originally created by Redhat. Dpkg, the format used by Debian, is a distant second. Apt is a toolset for managing packages, including dependency resolution; while originally designed for Debian, it works with RPMs as well. Finally, it is possible to install packages by compiling them from source.

RPM

RPM is the Redhat Package Manager. While originally developed by Redhat, it is now also used by Suse, Mandrake, and several other distributions, and is by far the most prevalent. In addition to supporting package install and removal, it provides support for resolving dependencies on and conflicts with other packages.

Dpkg

Dpkg is the Debian package manager. Like RPM, it has support for dependency and conflict resolution. It also supports weaker dependencies (that is, a package can "suggest" or "recommend" another). Dpkg comes with a frontend, dselect, which automatically downloads packages on request, including dependencies. Dselect has been, to a degree, obsoleted by Apt.

An additional feature of Dpkg is support for debconf. Debconf is the Debian configuration manager. Debconf provides a centralized database of configuration settings for a given system. This database can be used to allow for a non-interactive install. It also provides a unified interface for changing configuration settings.

Apt

Apt is a frontend for package management systems. Originally developed to run with Dpkg, it has been ported to work with RPM as well. Apt can be used to query or search the package database (using the apt-cache tool) or to install or remove a package (using the apt-get tool). One of the biggest draws of Apt is the command apt-get install package, which downloads, installs, and configures the package and all dependencies.

However, Apt has another powerful feature as well, upgrading. Running the command apt-get upgrade will automatically download and install the latest version of all out-of-date packages. apt-get dist-upgrade goes one further, allowing one to upgrade entire releases (for instance, upgrade from Debian 2.2 to Debian 3.0).

Compiling Packages by Hand

For complete control over what is installed on your machine, the only option is to compile applications by hand. This may also be necessary if the application you want to install is not yet being distributed in your distribution. There are some packages which are illegal to distribute in binary form, but legal in source code form.

Source packages tend to be released as .tar.gz files. These are compressed tar archives. They can be expanded with the command tar xzvf file.tar.gz. Most such packages have a README or INSTALL file at the top level which describes how to compile and install the package.

It is not possible to cover every possible method for compiling a program; we are covering the most straightforward, increasing common method, called autoconf. The package likely uses this method if there is a configure script at the top level. To compile the package, first run this script. Then run make. Then as root, run make install. In the absence of errors, this will result in the application being installed as desired in the package's default location (generally under /usr/local). This and other compile settings can generally be adjusted by passing options to the configure script (the --help option will list all available options).

Comments, questions, feedback, criticisms?

Send feedback