Fixing segmentation fault in apt upgrade
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.
-
ted@mini:/var/lib/dpkg/info$ sudo dpkg –configure –pending
-
Setting up synaptic (0.62.5ubuntu3) …
-
Segmentation fault
-
dpkg: error processing synaptic (–configure):
-
subprocess post-installation script returned error exit status 139
-
Setting up evolution-documentation-en (2.26.1-0ubuntu2) …
-
Segmentation fault
-
dpkg: error processing evolution-documentation-en (–configure):
-
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:
-
ted@mini:/var/lib/dpkg/info$ sudo scrollkeeper-update
-
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!
You might also enjoy:

