What to do when 'dpkg --configure -a' fails with too many errors?

Posted by rudivonstaden on Ask Ubuntu See other posts from Ask Ubuntu or by rudivonstaden
Published on 2012-06-19T16:38:24Z Indexed on 2012/06/25 15:23 UTC
Read the original article Hit count: 212

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?

© Ask Ubuntu or respective owner

Related posts about 12.04

Related posts about 10.04

  • An increase to 3 Gig of RAM slows down Ubuntu 10.04 LTS

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I have Ubuntu 10.04 running from an external hard drive (installed on an enclosure) connected via USB port. Like a month or so ago, I increased RAM on my pc from 2 Gigs to 3 Gigs. This resulted on extremely long boot times and slow application loads. While I was understanding the nature of my problem… >>> More

  • Default /etc/apt/sources.list?

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I need default source list for ubuntu 10.04. Can anybody help me? Here is Mine:--- Ubuntu supported packages deb http://archive.ubuntu.com/ubuntu/ lucid main restricted multiverse universe deb http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse deb http://archive… >>> More

  • SSH main process ended

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I have a running ubuntu server 10.04.1. When I tried to login to the server via ssh, I could not. Instead, I got connection refused error. I tried to ping the machine and I got reply! So, the clear reason is that SSH daemon is stopped. After reboot, I was able to login to my server via ssh. After… >>> More

  • PPA causing 404 error?

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I need default source list for ubuntu 10.04. Can anybody help me? Here is Mine:--- Ubuntu supported packages deb http://archive.ubuntu.com/ubuntu/ lucid main restricted multiverse universe deb http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse deb http://archive… >>> More

  • Postgresql fails to start on Ubuntu 10.04.4 LTS

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I installed postgresql 9.2 from add-apt-repository ppa:pitti/postgresql using apt-get install postgresql-9.2 At the end of the install and every time I try to launch postgresql by using the following command /etc/init.d/postgresql start or service postgresql start I get this error: Error:… >>> More