Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After removing a PPA recently my local package system got messed up. It now asks me to run sudo apt-get -f install to fix dependencies.

Having waited a couple of days for the issue to resolve itself (sometimes dependencies change due to new pacakage releases), it didn't happen after all. So my question is: What is the way out? Is reinstalling the system the only method?

Note: I am aware that this is not the place to handle your problems with alpha releases, but in my opinion it is worthwhile to give a general answer on how to tackle the problem.

PS: The terminal output of my specific problem

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  libx264-118
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libglib2.0-0 libglib2.0-bin libglib2.0-dev
Suggested packages:
  libglib2.0-doc
The following packages will be upgraded:
  libglib2.0-0 libglib2.0-bin libglib2.0-dev
3 upgraded, 0 newly installed, 0 to remove and 150 not upgraded.
9 not fully installed or removed.
Need to get 0 B/3.062 kB of archives.
After this operation, 130 kB disk space will be freed.
Do you want to continue [Y/n]? y
dpkg: error processing libglib2.0-0 (--configure):
 libglib2.0-0:amd64 2.31.14-0ubuntu1~build1 cannot be configured because libglib2.0-0:i386 is in a different version (2.31.14-0ubuntu1)
dpkg: dependency problems prevent configuration of libglib2.0-bin:
 libglib2.0-bin depends on libglib2.0-0 (= 2.31.14-0ubuntu1~build1); however:
  Package libglib2.0-0 is not configured yet.
dpkg: error processing libglib2.0-bin (--configure):
 dependency problems - leaving unconfiguredNo apport report written because the error message indicates its a followup error from a previous failure.

dpkg: dependency problems prevent configuration of libglib2.0-dev:
 libglib2.0-dev depends on libglib2.0-0 (= 2.31.14-0ubuntu1~build1); however:
  Package libglib2.0-0 is not configured yet.
 libglib2.0-dev depends on libglib2.0-bin (= 2.31.14-0ubuntu1~build1); however:
  Package libglib2.0-bin is not configured yet.
dpkg: error processing libglib2.0-dev (--configure):
 dependency problems - leaving unconfigured
dpkg: error processing libglib2.0-0:i386 (--configure):
 libglib2.0-0:i386 2.31.14-0ubuntu1 cannot be configured because libglib2.0-0:amd64 is in a different version (2.31.14-0ubuntu1~build1)
dpkg: dependency problems prevent configuration of libgtk-3-0:
 libgtk-3-0 depends on libglib2.0-0 (>= 2.31.14); however:
  Package libglib2.0-0 is not configured yet.
dpkg: error processing libgtk-3-0 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgail-3-0:
 libgail-3-0 depends on libglib2.0-0 (>= 2.31.14); however:
  Package libNo apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                                       No apport report written because MaxReports is reached already
                                              No apport report written because MaxReports is reached already
                                                                                                            No apport report written because MaxReports is reached already
                                   No apport report written because MaxReports is reached already
                                                                                                 No apport report written because MaxReports is reached already
                        glib2.0-0 is not configured yet.
 libgail-3-0 depends on libgtk-3-0 (= 3.3.12-0ubuntu1~build1); however:
  Package libgtk-3-0 is not configured yet.
dpkg: error processing libgail-3-0 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gir1.2-gtk-3.0:
 gir1.2-gtk-3.0 depends on libgtk-3-0 (>= 3.3.12); however:
  Package libgtk-3-0 is not configured yet.
dpkg: error processing gir1.2-gtk-3.0 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgtk-3-bin:
 libgtk-3-bin depends on libgtk-3-0 (>= 3.3.12-0ubuntu1~build1); however:
  Package libgtk-3-0 is not configured yet.
dpkg: error processing libgtk-3-bin (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgtk-3-dev:
 libgtk-3-dev depends on libgtk-3-0 (= 3.3.12-0ubuntu1~build1); however:
  Package libgtk-3-0 is not configured yet.
 libgtk-3-dev depends on gir1.2-gtk-3.0 (= 3.3.12-0ubuntu1~build1); however:
  Package gir1.2-gtk-3.0 is not configured yet.
 libgtk-3-dev depends on libglib2.0-dev (>= 2.31.14); however:
  Package libglib2.0-dev is not configured yet.
dpkg: error processing libgtk-3-dev (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libglib2.0-0
 libglib2.0-bin
 libglib2.0-dev
 libglib2.0-0:i386
 libgtk-3-0
 libgail-3-0
 gir1.2-gtk-3.0
 libgtk-3-bin
 libgtk-3-dev
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question
1  
You could try using Synaptic Package Manager to mark those packages to be upgraded, if the option is available, or to be re-installed. I recently found that Update Manager fixed some of these dependency issues that apt-get -f install did not fix. –  grahammechanical Feb 3 '12 at 16:20
add comment

3 Answers

up vote 2 down vote accepted

This worked for me:

  1. Open Synaptic
  2. It might say There are broken packages on your system. If it does, go to Edit -> Mark broken packages and hit apply.
  3. Close Synaptic and do sudo apt-get update && sudo apt-get upgrade and everything might be fine again.
share|improve this answer
1  
This solution worked for me, cheers mate! :) –  Daniel Jun 21 '12 at 9:26
add comment

sudo dpkg --configure -a and then running sudo apt-get -f install should do the trick

share|improve this answer
add comment

sudo dpkg --configure --pending should clean up the packages that are not fully installed. After they're installed, or if it fails, try sudo apt-get purge <packages>

share|improve this answer
add comment

Your Answer

 
discard

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.