Fixing segmentation fault in apt upgrade

A Tech article with View Comments posted 24 September 2009.
Tags: , ,

I was having some problems getting aptitude to install new packages. It might have been caused by a crash on my netbook while installing packages, but in any case, nothing was working. The output looked like this, over and over again for about two dozen packages.

  1. ted@mini:/var/lib/dpkg/info$ sudo dpkg –configure –pending
  2. Setting up synaptic (0.62.5ubuntu3)
  3. Segmentation fault
  4. dpkg: error processing synaptic (–configure):
  5.  subprocess post-installation script returned error exit status 139
  6. Setting up evolution-documentation-en (2.26.1-0ubuntu2)
  7. Segmentation fault
  8. dpkg: error processing evolution-documentation-en (–configure):
  9.  subprocess post-installation script returned error exit status 139

So after some googling, I tried sudo dpkg --configure --pending. That didn’t fix it either, but it gave me an idea. I went poking around in the postinst files for those packages, and found that it was dying on scrollkeeper-update.

You can verify that this is the problem for you like this:

  1. ted@mini:/var/lib/dpkg/info$ sudo scrollkeeper-update
  2. Segmentation fault

The problem is that the scrollkeeper database is corrupt. Run sudo scrollkeeper-rebuilddb to regenerate the corrupt database and fix the nasty problem (this could take several minutes to complete), then sudo aptitude -f install to finish installation of the partially configured packages. Then you can apt like normal again!

Leave a Reply

blog comments powered by Disqus