Jan 12, 2007
Ubuntu Dapper is NOT debian-unstable
A cautionary tale about installing debian-unstable packages under Ubuntu Dapper.
I needed version 6.6 of the Glasgow Haskell Compiler and Dapper/Edgy only supply version 6.4.2. I found a mailing list post explaining that 6.6 was available under debian-unstable, which is what Ubuntu is based on. So I downloaded the .deb and tried to install it.
No dice. Requires a partcular version of libc6. So go grab that (BIG mistake – this is possibly the most central library in the whole system and switching versions of it was never going to be a good idea). Try to install, find a dependency (tzinfo), try to install the dependency and kapow – failed in mid-install! Tried to overwrite a file that dpkg thought belonged to the locales package.
Now, whatever I did I got something like this:
sudo apt-get -f install Reading package lists... Done Building dependency tree... Done Correcting dependencies... failed. The following packages have unmet dependencies. libc6: Depends: tzdata but it is not installable libc6-dev: Depends: libc6 (= 2.3.6-0ubuntu20) but 2.3.6.ds1-10 is installed libc6-i686: PreDepends: libc6 (= 2.3.6-0ubuntu20) but 2.3.6.ds1-10 is installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. E: Unable to correct dependencies
I tried every combination of: apt-get remove, apt-get install, dpkg -r and dpkg -i with each package name and variations on the package names as well as bare apt-get install -f and using –force and –purge and goodness knows what else (many thanks to the denizens of #ubuntu on freenode for their many suggestions). Whatever I did the system would just tell me it was queueing up to install the debian versions of ghc and libc6 and that it couldn’t work it’s way out of the dependency pickle.
Finally a knight in shining armour by the unexpected name of “crot” came up with this baby:
sudo apt-get install -f libc6/dapper
The /dapper forces the system to install the correct version even though the debian package is also called libc6. Thanks crot!
I leave this blog post for those who try something equally foolish. If you use a package from the wrong distribution or wrong version, this may help you out.