Friday, June 6, 2008

Package Manager Problems

I've been busy trying out new programs and adding repositories and today the synaptic package manager stopped working. It would run and then disappear.

I did a quick test by opening a terminal and issuing the command:

sudo apt-get update

which resulted in an error message

Segmentation fault (core dumped)

which is serious. So did some digging around the net and found there is a bug that exhibits the following behavior:

  • Apt-get update starts to update then runs out of Cache-Limit space
  • This corrupts some files in the /var/lib/apt/lists folder
  • Next time you run apt-get it exits with a core dump error
The solution was to first back up all the lists by copying the folder to a safe location. Then i used the following command to delete the files:

sudo rm /var/lib/apt/lists/* -vf

Deleting the lists folder removes the corrupted files but there is still the Cache-Limit problem. The next step was to increase the default cache used by the package manager. This was done by editing the configuration file in /etc/apt/apt.conf.d with the following command:

sudo pico 70debconf

and inserting a new line with:

APT::Cache-Limit "118388608";

and saving the file. We then did:

sudo apt-get update

which recreated the lists. We were now able to run the synaptic package manager. For more details see the excellent post by Ray Ward at:

https://bugs.launchpad.net/ubuntu/+source/apt/+bug/113424

No comments: