7. Configuring the Package Manager

The configuration of the sources

Note: I need still to devote a section on configuring sudo. It seems knoppix comes with a version of the /etc/sudoers file that does not allow any user to issue a sudo. If you have trouble using sudo, just login as root for the commands you wish to do as super user.

Debian comes with a very nice package update tool. What this means is that for each package in debian someone is responsible for making sure it is packaged in such a way that it is readily installable in three different flavors: stable, testing and unstable.

To get to those packages, you can use a bunch of mirrors. Knoppix comes with a list of mirrors, but Knoppix decided to include a bunch of mirrors that don't seem so stable. So, what we should be doing is try to stick with the official debian mirrors. They are hardly ever down and will cover most of the software available in the Free Software World.

This list can be found on your system in /etc/apt/sources.list and needs to be updated from the command line. You need to edit this file and comment out any line not pointing to a debian.org mirror, or at least that is the safest. You do this by making sure the lines that we don't need are commented out, i.e. start with a hash-sign (#). Just keep the lines for debian stable and debian testing, that are the only ones you will need.

Then, typing sudo apt-get update will connect to the mirrors and download the information about the packages available there to your system. This is an operation that is best done before any installation of software. Now for the tricky bit: sudo apt-get upgrade will make sure your debian installation is up to date with all of the existing packages.

This will all take some time and some packages will interactively prompt you for some settings, but this should all be rather straightforward.

Installing a package

Well, why would we not try to install a package. Especially since lately we don't seem to have the SSL libraries we need to install webmin properly, this section is a good place to learn to install these via the package management system. Should you skip this stage, you would find that the next section will give you a warning about ssleay libraries gone missing, and webmin would be started on a normal http port instead of the https port we want it to be on.

So, what we will do is search the Debian packages website for the ssleay library, and we end up at http://packages.debian.org/cgi-bin/search_packages.pl?keywords=ssleay&searchon=names&subword=1&version=stable&release=all. There are three choices, so it would seem we have to make a choice.

You can browse the website further to find out what is in the packages, which packages are available for your architecture, and short descriptions about what they do, the known bugs, etc... It turns out we need to install libnet-ssleay-perl, to get webmin to work properly, so that's what we'll do.

To install a package, you need superuser privileges, so you should prepend the apt-get command with sudo.

Code listing 7.1: Installing libnet-ssleay-perl

kristof@knoppixbox:~/$ sudo apt-get install libnet-ssleay-perl
The package manager warns how many packages will be removed, how many will be upgraded and how many will be installed. If the package you are installing needs other non installed packages, you will see them appear in this list.

That's all there is to it, really. You can install the latest version of kde if you want, but I would not just do that. You see, sometimes things do go wrong.

Troubleshooting

Well, you know by know how I hate to admit it, but sometimes... yep, things do go wrong. For instance, in the DNS section later on, you will find things went wrong at the time I wrote the section, and I had to do a manual installation of a package. Not so good.

Not so bad as this guy though, which seemed to have nearly everything going against him. You have to be good though to fuck up things, but I've done it at least once. His advice is to never ever have testing in your sources list, but I've tried that and you soon miss a couple of packages you really really want to install. So, my advice is to be conservative as to what packages you install, and use this Knoppix as a base for all the packages you don't have to get from the internet.

One thing I encountered once though, is this:

Code listing 7.2: When apt-get just does not cut it

kristof@knoppixbox:/etc# sudo apt-get install resolvconf
Reading Package Lists... Done
Building Dependency Tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  resolvconf: Depends: initscripts (>= 2.85-15) but it is not going to be installed
E: Broken packages

You have to admit to it, it's not such a bad error message. It is extremely likely that the package is simply not installable and a bug report against that package should be filed. How's that for a mea culpa?

Ok, things went wrong, but we need to continue, so what did I do? Download the deb package from the debian website manually. Like this:

Code listing 7.3: Installing a dpkg manually

You should never have to do this.  Ok, only in rare circumstances.
kristof@knoppixbox:/home/kristof/download# sudo dpkg --unpack resolvconf_1.21_all.deb
(Reading database ... 110800 files and directories currently installed.)
Unpacking resolvconf (from resolvconf_1.21_all.deb) ...
kristof@knoppixbox:/home/kristof/download# sudo dpkg --force-depends --configure resolvconf
dpkg: resolvconf: dependency problems, but configuring anyway as you request:
 resolvconf depends on initscripts (>= 2.85-15); however:
  Package initscripts is not installed.
Setting up resolvconf (1.21) ...
mkdir: created directory `/etc/resolvconf/run'
mkdir: created directory `/etc/resolvconf/run/interface'

This then asks about whether or not to add the old resolv.conf file to the new dynamic configuration, to which we can reply "No".

Figure 7.1: Configuration question of the resolvconf package

Fig. 1

And guess what? That does it too... it's not orthodox, as can be seen in the --force-depends parameter, which basically just tells apt-get to go on, no matter what dependency criteria are not resolved. Not to be repeated oftenly!

line
Updated $LastChangedDate: 2004-11-05 23:24:59 +0100 (Fri, 05 Nov 2004) $
line
Kristof Van Landschoot
Author

line
Summary: How we will configure the package manager and use it to install most of our software.
line
Copyright 2003-2004 Coin-C bvba. Questions, Comments, Corrections? Email knoppix@coin-c.com.