How to break your Linux system and then fix it
From the vault of Bad Things To Do.
I've been trying to install Kdenlive lately. There's a dependency problem in the version from Trevino's repos - it depends on libfreetype6 (>=2.3.5) but Feisty only has 2.2.1 or something like that. I tried compiling from source, but there were some fatal errors during build.
So my next idea was to compile libfreetype 2.3.5 and use Checkinstall to install it with the correct name and version, so that the Trevino dependency would resolve and I could install Kdenlive. So I tried that - and promptly found that I could no longer start graphical programs!
I Control-Alt-F1'ed to the terminal, and was trying to think of solutions. Apt-get install -f proposed a dumb solution - to get rid of libfreetype6-dev, which wouldn't have done anything.
I was thinking along the lines of "reinstall libfreetype6", but that would likely only reinstall the faulty version. So I thought "Maybe I should remove the .deb package I just created", but then it might complain that it couldn't reinstall libfreetype6 because it couldn't find the package! (and then I'd really be up shit creek).
Luckily, Aptitude saved the day, and from the textual-graphical mode it came up with the correct solution - downgrade libfreetype6 to the Ubuntu version. It also thought it would be fun to reinstall Gaim and remove Exaile, but at least it got me out of a tight spot.
Now, I'm sure there would have been other solutions, such as locking the libfreetype6 package to the older version and then running apt-get install -f; but I couldn't be bothered to look up how to do that on the command line. But the point is that I'm now back to my fully-functional desktop, thanks to Aptitude :-)

Comments