Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

During an upgrade from lucid (10.04) to precise (12.04), the X session froze, and I have been trying to recover the upgrade to get a stable system. I have performed the following steps:

  1. Used ssh to log in to the stalled system over the network.
  2. Checked the contents of the /var/log/dist-upgrade directory. There was no activity on main.log, apt.log or term.log.
  3. top showed that process 'precise' was using about 3% CPU, but I could find no evidence that the upgrade process was still doing anything.
  4. 'dpkg' did not show up in top, but it came up with pgrep dpkg | xargs ps
  5. Killed the 'dpkg' and 'precise' processes
  6. Tried to recover the upgrade by running sudo fuser -vki /var/lib/dpkg/lock;sudo dpkg --configure -a. This was partially successful (some packages were configured), but failed with the message Processing was halted because there were too many errors. I ran the same command a few times, and each time some packages were configured but others failed.
  7. Tried running sudo apt-get -f install. It fails with similar errors to dpkg.

The current situation is that dpkg --configure -a and sudo apt-get -f install fails with two kinds of error:

  1. Dependency issues, e.g.:

    dpkg: dependency problems prevent configuration of cifs-utils:
    cifs-utils depends on samba-common; however:
    Package samba-common is not configured yet.
    dpkg: error processing cifs-utils (--configure):
    dependency problems - leaving unconfigured
  2. Resource conflict, e.g.:

    debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable

Additionally, it seems there's reference to potential boot problems, so I'm not keen to reboot without fixing the install first:

    dpkg: too many errors, stopping
    Processing triggers for initramfs-tools ...
    update-initramfs: Generating /boot/initrd.img-3.2.0-25-generic
    cryptsetup: WARNING: failed to detect canonical device of /dev/sda1
    cryptsetup: WARNING: could not determine root device from /etc/fstab

So my question is, how to get a working install when dpkg --configure -a fails?

share|improve this question
Have followed the steps at… but still have unresolved dependencies. Downloading ISO and will do a clean install. – rudivonstaden Jun 19 '12 at 22:07
up vote 4 down vote accepted

I managed to rescue the upgrade, although I am not 100% sure what it was that worked. Others might still benefit:

  1. I managed to recover my X session by switching to a command-line terminal (Ctl+Alt+F2) and then back to the X terminal (Ctl+Alt+F7), which then asked me to login again. The system was unstable but worked. I was then able to close a couple of upgrade-related prompts.

  2. It seems that the update manager did not disable PPA's, so I cleaned up /etc/apt/sources.list.d/ (deleted all entries). It was suggested on IRC (#ubuntu) that I should use ppa-purge to clean up the PPA's, but in the end I simply deleted them.

  3. After this, sudo apt-get update and sudo apt-get -f install cleared up most of the remaining issues, but there were still dependency problems with samba.

  4. I managed to fix samba by removing it (sudo apt-get remove samba) and reinstalling it (sudo apt-get install samba).

After this, the system was more-or-less stable. I had to also remove and reinstall unity after a restart, but otherwise it's been working well.

share|improve this answer

I had this issue today trying to upgrade to 14.04. I noticed similar messages as:

debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable

I used sudo fuser /var/cache/debconf/config.dat to figure out which process was stuck. Do notice that you have to find the exact file that is 'stuck'. Apparently some front end thing that didn't properly pop up but did lock the progress of the update. After killing that process I was able to resume patching the system with the regular commands.

share|improve this answer

I had a similar problem: 1. Synaptics would not launch ==> Error message: "run sudo dpkg --configure -a"

  1. "sudo dpkg --configure -a" would fail AND reboot my PC (several times)

  2. All "sudo apt-get ..." intents would fails with same error message: $ sudo apt-get autoclean E: se interrumpió la ejecución de dpkg, debe ejecutar manualmente «sudo dpkg --configure -a» para corregir el problema.

WORKED FOR ME: 1. Runned several times "sudo apt-get update" UNTIL no more package download.

PASS N: Ign trusty/universe Translation-es_ES Descargados 4.294 kB en 31seg. (137 kB/s) E: se interrumpió la ejecución de dpkg, debe ejecutar manualmente «sudo dpkg --configure -a» para corregir el problema $

PASS N+1: Ign trusty/universe Translation-es_ES E: se interrumpió la ejecución de dpkg, debe ejecutar manualmente «sudo dpkg --configure -a» para corregir el problema $ UNTIL NO "Descargados " message appears (download).

  1. Runned again "sudo dpkg --configure -a"

AND IT WORKED then... not sure why/how. But OK now.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.