August 27, 2007

Unmet dependency solution in Synaptic

Most Linux users have an ugly Pavlovian response to the phrase "unmet dependencies". Because I use a distribution that coddles me to a (sometimes unhealthy) extreme, I had forgotten about the frightening package dependency jumbles that I used to get into when I used Fedora Core 3.

I reformatted my laptop's hard drive in order to switch to XFS. [*] As with all installations that I don't have time to automate, I end up making the same little tweaks I always make in slightly different ways. In tweaking the font clarity, however, I got a bit carried away, and started reading about code that (purportedly) improved font quality dramatically, but hadn't made it into the Feisty version of the Ubuntu distribution.

I (stupidly) installed a third party package instead of searching around for other options first. The result was some mild package mayhem.

Here's a short description of how to go about solving a problem similar to this one using Synaptic (the GUI manager for dpkg systems):

  1. Track the dependency chain down to the first conflicting package. You'll get messages like "This package [you're trying to install] depends on X, but X isn't going to be installed." X is your new target, for each X, iteratively.

  2. Try to force the package to the official version (Ctrl+E). You'll likely get more messages like in 1. If you do, GOTO 1. Otherwise, move on to 3.

  1. End up at a (most reduced) conflicting package. You'll get a message that says, "This whole mess of applications will have to be removed." If you get this, you've found one of the most reduced conflicting packages. In this case I found it to be libfreetype6. I couldn't force libfreetype6, because there were very important packages (e.g. ubuntu-desktop) that depended on upgraded packages that depended on this new version of libfreetype6. You can view dependent packages via the package properties that Synaptic displays; however, you don't see what version they are dependent on (I'll submit a feature request in a few days). As a result, your best bet is to search for dependent packages via Synaptic's search feature.

  1. Knock off 3rd party dependent packages by forcing them to the official version. Be wary of removing a lot of important things by accident in the process! If it has a slew of applications "to be removed", try forcing other dependent packages to the official version first.

  2. Work your way back down to the more shared packages by forcing versions up the dependency tree. Once you force less-shared packages to official versions or prune off unnecessary packages, you should be able to start forcing more-shared packages to official versions. This is a natural result of having less unofficial stuff to support dependencies for!

NOTE: This entry is sloppily written in a stream-of-conscious style, but I don't really have much time to edit it. Sorry!



I thought that the potential performance benefits of a metadata-only journaling filesystem were intriguing, and I hoped that it would alleviate some of the degradation that I encounter running a 5400rpm drive.