Previous Section  < Day Day Up >  Next Section

Recipe 3.4. Installing Packages on Debian-Based Systems

3.4.1 Problem

All these software archives, CDs, and so on are meaningless if you can't install the software. So: you need to know how to install packages on Debian.

3.4.2 Solution

Use apt-get install:

# apt-get install tuxkart

To reinstall a package, overwriting the files, use:

# apt-get install —reinstall tuxkart

To install several packages at once, use a space-delimited list:

# apt-get install tuxkart gltron frozen-bubble 

tuxracer nethack galaga

To download only, without installing or unpacking, use:

# apt-get -d install tuxkart

Append —dry-run to test the command before executing it:

# apt-get install tuxkart gltron frozen-bubble tuxracer nethack galaga —dry-run

3.4.3 Discussion

To find package names, use Debian's package search page at http://www.debian.org/distrib/packages/. Debian's package names are often very different from their RPM cousins. For example, CyrusSASL is packaged as sasl-2.x.rpm, but on Debian it's split into several packages named libsasl-*.

Remember to run apt-get update after changing /etc/apt/sources.list, and run it periodically to stay current with the package repositories.

apt-get fetches and installs (and when necessary, deletes) all packages necessary to resolve all dependencies.

3.4.4 See Also

  • apt-get(8)

  • Local documentation (/usr/share/doc/Debian/apt-howto)

    Previous Section  < Day Day Up >  Next Section