Search :

How to install packages on Debian machines

From: Phil Cowans

As you may know, the new machine, eigg, is running Debian 3.0 rather
than RedHat Linux. Here are a few notes on installing new packages on
a Debian machine. Debian uses the 'apt' system for package
management. This is has the advantage over RPM of being able to
install dependencies automatically, which normally makes installing
new packages very easy.

Here are the commands needed for some common tasks:

1. Use 'apt-cache search' to give a list of available packages
matching a given search string, for example:

kern:~$ apt-cache search gnumeric
gnumeric - A GNOME spreadsheet application
gnumeric-doc - Documentation for Gnumeric, the GNOME spreadsheet application

2. Use 'apt-cache show' to give a detailed description of a package, eg:

apt-cache show gnumeric-doc

The following commands all require you to be root in order to carry
them out:

3. Use 'apt-get update' to refresh the list of available
packages. This should really be done before upgrading or installing

4. Use 'apt-get upgrade ' to upgrade a given package to the latest available version. If is omitted then all installed packages will be upgraded.

Note that security patches count as upgrades in Debian, and that the stable release (which we have installed) is very rarely changed for any other reason. It is therefore wise to do 'apt-get update' followed by 'apt-get upgrade' every time a security patch is released. Security patches are announced on the debian-security-announce mailing list, which you can subscribe to here.

5. Use 'apt-get install ' to install the specified package and anything that the package depends on. You will be asked to confirm if this means installing or changing a lot of things. You will also be asked questions to configure the new package if necessary.

ps. I'll leave it as an exercise to the reader to determine the function of the command 'apt-get moo' (no need to be root) :-)

The Inference Group is supported by the Gatsby Foundation
and by a partnership award from IBM Zurich Research Laboratory
David J.C. MacKay
Site last modified Fri Oct 24 11:49:02 BST 2014