Datasheet

86
Part I The Fundamentals
The output you get won’t be identical to the output here, but it should be close. If
you get any errors, chances are your /etc/apt/sources.list is broken. If this
is the case, go ahead and remove that file with rm /etc/apt/sources.list,
and run apt-setup to generate a new one.
Having updated the package list, go ahead and install vim. vim is an editor, a Vi
clone, but it has far more features:
hostname:~# apt-get install vim
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
libgpmg1
The following NEW packages will be installed:
libgpmg1 vim
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/3796kB of archives. After unpacking 12.3MB will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.us.debian.org stable/main libgpmg1 1.19.6-12 [45.2kB]
Get:2 http://ftp.us.debian.org stable/main vim 6.1.018-1 [3751kB]
Selecting previously deselected package libgpmg1.
(Reading database ... 6633 files and directories currently installed.)
Unpacking libgpmg1 (from .../libgpmg1_1.19.6-12_i386.deb) ...
Selecting previously deselected package vim.
Unpacking vim (from .../vim_6.1.018-1_i386.deb) ...
Setting up libgpmg1 (1.19.6-12) ...
Setting up vim (6.1.018-1) ...
hostname:~#
Here you see Debian’s dependency-resolution at play. vim depends on libgpmg1, so
that package was marked for installation automatically.
apt-get wanted to be sure
that the extra installation was acceptable, so it asked for confirmation. Then it went
ahead and downloaded and installed the packages. Pretty simple, and that’s it.
To reinstall a package, use
apt-get --reinstall install packagename.
Installing packages using aptitude
Before using aptitude, you should run aptitude update, which has a similar pur-
pose and effect as running
apt-get update. Alternatively, you can press the U key
when in
aptitudes normal interactive fullscreen mode.
aptitude can be used in the same way as apt-get, right on the command-line. In
this example, you’ll install
mutt, a common console-based e-mail client. First, look at
mutts package relationships more closely, using the apt-cache show command:
Tip
09_576445 ch04.qxd 7/5/05 3:10 PM Page 86