when trying to install something through apt-get or using dpkg -i to install a deb file the process gets stuck in reading the database. The last lines of the output read as follows:
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ...
Then no progress at all. I already tried doing various combinations of
apt-get update && apt-get upgrade (update works, upgrade fails)
apt-get install -f (doesn't change anything)
dpkg --configure -a (doesn't seem to do anything)
dpkg --clear-avail (same as before)
I also tried using one of the backups of /var/lib/dpkg/status found in /var/backups, but with no success.
I checked the status of every package installed is OK
I first noticed the problem when I was running an update. I'm using Ubuntu 14.04 which has dpkg 1.17.5
Thanks in advance
The following commands make it almost instantaneous:
sudo dpkg --clear-avail
sudo sync-available
sync-available is part of the dctrl-tools package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With