Package management tips
TODO: cleanup/move to appropriate pages
Before installing any network server Debian package
Make sure that 'hostname' returns your hostname and 'hostname -d' returns your domain name. If it does, then the networking packages you install will work out of the box. If if doesn't, then Debian might fail to properly configure such packages automatically upon installation, and you will end up having to manually edit their configuration files to make the software work at all. This can be simple, as is the case with Apache, or terrifying as is the case with ?inn2, the Usenet server.
When installing a Debian package fails with an error,
- Either the package, or some package related to it, has a bug or you've altered your system in some way which is non-obvious to the packaging system.
- To re-configure the package again (and again, and again...), trying different settings if necessary, run:
dpkg-reconfigure -plow <package>
To reinstall the package see AptCLI
- Have a look at the package installation scripts. Debug these. Note that sometimes these scripts will call other scripts provided by other packages. Sometimes the bug is not in the package that failed, but rather in the package that provides these supporting scripts. You can find the scripts at:
/var/lib/dpkg/info/<package>.(pre||post)inst
When you find and identify a bug, file a ?DebianBug report. A good tool for this is reportbug. Make sure you are not duplicating an existing bug report, and check that it has not been fixed in a more recent version of the package.
When a Debian package installs without errors, but doesn't seem to work:
- The package probably doesn't automatically configure itself or defaults to disabled. There is probably a reason for this. First check in the doc directory to see if there is an explanation. Next look at the package's init.d script for a daemon package and see if it needs editing. Have a look at inetd.conf to see if the service needs to be un-commented or added. See if you can find anything related in /etc/default.
/usr/share/doc/<package>/Debian.* /etc/init.d/<package> /etc/inetd.conf
- Check other system configurations that might be disabling it. In particular, check hosts.allow and hosts.deny. Scrupulous firewalling is often the first thing to install, but is the last thing you remember to check when your new package mysteriously doesn't work.
/etc/hosts.allow /etc/hosts.deny
- It is possible the package has a bug. Follow the same procedure for when a package fails to install.
After you get it working, think about why it didn't work automatically. If you can think of a neat way it could have been automated, file a wishlist ?DebianBug against the package, doing the usual check for existing bugreports and updates first.