Problems Updating Debian or Ubuntu
From time to time doing update/upgrades to Debian/Ubuntu systems causes circular dependency problems. There are usually ways of getting out of these situations, but they are sometimes quite time consuming to find. Most users seem to chose to simply to do a complete reinstall.
I don't like cold installs, since I've often built stuff from patched source, and a complete dist-Upgrade sucks!
For this reason in future I'll put descriptions here (or links) of how I got past some of the nastier “Catch 22” situations here (ie: anything that wastes more than 30 minutes to find) .
1/ Nasty sleeper bug with libc6:
"A non-dpkg owned copy of the C library was found in /lib."
going from libc6.10... to libc6.13.. causes a crash as a result of the preinst script in libc 2.13-6.
One thing that can cause this is having ldso and any leftover bits of libc5 installed ,and not purged. Remove them and you might pacify libc6 preinst – It worked for me, but it seems other users have trouble with scraps from other old packages.
Under no circumstances rub out your old libc6 as requested!
I remember going from libc5 to libc6 was difficult back some 10 years ago.This is like old Vlad creeping up from his Transylvanian resting place. Maybe whoever did the preinst script for this could try something mellower and not force us to unwrap packages and edit the preinst scripts.
At some stage the dpkg database format was changed. Unfortunately this breaks on later installationsof dpkg, and there does'nt seem to be any easy way to recover from this situation.
The thread library has been moved into libc. This breaks lots of makefiles that explicitly use libpthreads. I have put symlinks to the stub library to save the trouble of fixing makefiles to check libc versions.
A race situation can occur installing python2.7-minimal and python 2.7 giving "E: pycompile:240: Requested versions are not installed". To bypass this cyclic dependancy, edit /usr/share/python/debpython/version.py to SUPPORTED = [(2, 6), (2, 7)]
pppd: Couldn't get channel number: Input/output error. This is a "cover all" error message. It turned up for me when pppoe got uninstalled accidentally.
locales: Updating or installing a package caused a bug where the root file system was mounted read-only despite all file systems being clean, and the root partition being remountable read-write. Updating locales and its dependencies fixed this bug.
python-numpy: Updating this updates libblas3, which fails with an error "alternative libblas.so.3gf can't be slave of libblas.so.3: it is a master alternative" A google search reveals this to be "bug #659784" which keeps returning. Im my case this was caused by an earlier fault in the uninstall scripts for packages libblas3 and liblapack3. Removal of the zombie files libblas.so.3gf and liblapack.so.3gf in directory /var/lib/dpkg/alternatives fixed this.
libreoffice: Going from python3 version 3.5 to version 3.6 breaks libreoffice. It is not clear which dependency is missing. Simply removing libreoffice and python3-uno and reinstalling does not fix this. It is necessary to purge both packages at the same time and then reinstall.