"apt-get -f install" fails with "/usr/bin/dpkg returned an error code (1)"

Posted by parsley72 on Ask Ubuntu See other posts from Ask Ubuntu or by parsley72
Published on 2012-09-15T03:13:52Z Indexed on 2012/09/15 3:48 UTC
Read the original article Hit count: 253

Filed under:

I started out trying to install CVS:

$ sudo apt-get install cvs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libcups2 : Breaks: libcups2:i386 (!= 1.5.3-0ubuntu3) but 1.5.3-0ubuntu4 is to be installed
 libcups2:i386 : Breaks: libcups2 (!= 1.5.3-0ubuntu4) but 1.5.3-0ubuntu3 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

But when I try this I get:

$ 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:
  tzdata-java
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libcups2
The following packages will be upgraded:
  libcups2
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
14 not fully installed or removed.
Need to get 0 B/172 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: error processing libcups2 (--configure):
 libcups2:amd64 1.5.3-0ubuntu3 cannot be configured because libcups2:i386 is in a different version (1.5.3-0ubuntu4)
dpkg: error processing libcups2:i386 (--configure):
 libcups2:i386 1.5.3-0ubuntu4 cannot be configured because libcups2:amd64 is in a different version (1.5.3-0ubuntu3)
dpkg: dependency problems prevent configuration of libcupsmime1:
 libcupsmime1 depends on libcups2 (>= 1.5~); however:
  Package libcups2 is not configured yet.
dpkg: error processing libcupsmime1 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libcupscgi1:
 libcupscgi1 depends on libcups2 (>= 1.4.0); however:
  Package libcups2 is not configured yet.
dpkg: error processing libcupscgi1 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libcupsppdc1:
 libcupsppdc1 depends on libcups2 (>= 1.4.0); however:
  Package libcups2 is not configured yet.
dpkg: error processing libcupsppdc1 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cups-client:
 cups-client depends on libcups2 (>= 1.5.0); however:
  Package libcups2 is not configured yet.
dpkg: error processing cups-client (--configure):
 dependency problems - leaviNo apport report written because the error message indicates its a followup error from a previous failure.
No 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
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
ng unconfigured
dpkg: dependency problems prevent configuration of cups-ppdc:
 cups-ppdc depends on libcups2 (>= 1.4.0); however:
  Package libcups2 is not configured yet.
 cups-ppdc depends on libcupsppdc1 (>= 1.4.0); however:
  Package libcupsppdc1 is not configured yet.
dpkg: error processing cups-ppdc (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cups:
 cups depends on libcups2 (>= 1.5.0); however:
  Package libcups2 is not configured yet.
 cups depends on libcupscgi1 (>= 1.4.2); however:
  Package libcupscgi1 is not configured yet.
 cups depends on libcupsmime1 (>= 1.5.0); however:
      Package libcupsmime1 is not configured yet.
 cups depends on libcupsppdc1 (>= 1.4.0); however:
  Package libcupsppdc1 is not configured yet.
 cups depends on cups-client (>= 1.5.3-0ubuntu4); however:
  Package cups-client is not configured yet.
 cups depends on cups-ppdc; however:
  Package cups-ppdc is not configured yet.
dpkg: error processing cups (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libcupsdriver1:
 libcupsdriver1 depends on libcups2 (>= 1.4.0); however:
  Package libcups2 is not configured yet.
dpkg: error processing libcupsdriver1 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-7-jre-headless:
 openjdk-7-jre-headless depends on libcups2 (>= 1.4.0); however:
  Package libcups2 is not configured yet.
dpkg: error processing openjdk-7-jre-headless (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-7-jre:
 openjdk-7-jre depends on openjdk-7-jre-headless (= 7u7-2.3.2-1ubuntu0.12.04.1);         however:
  Package openjdk-7-jre-headless is not configured yet.
 openjdk-7-jre depends on libcups2 (>= 1.4.0); however:
  Package libcups2 is not configured yet.
dpkg: error processing openjdk-7-jre (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cups-bsd:
 cups-bsd depends on libcups2 (>= 1.4.0); however:
  Package libcups2 is not configured yet.
 cups-bsd depends on cups-client (= 1.5.3-0ubuntu4); however:
  Package cups-client is not configured yet.
dpkg: error processing cups-bsd (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of icedtea-7-jre-jamvm:
 icedtea-7-jre-jamvm depends on openjdk-7-jre-headless (= 7u7-2.3.2-1ubuntu0.12.04.1); however:
  Package openjdk-7-jre-headless is not configured yet.
dpkg: error processing icedtea-7-jre-jamvm (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-7-jre-lib:
 openjdk-7-jre-lib depends on openjdk-7-jre-headless (>= 7~b130~pre0); however:
  Package openjdk-7-jre-headless is not configured yet.
dpkg: error processing openjdk-7-jre-lib (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libcups2
 libcups2:i386
 libcupsmime1
 libcupscgi1
 libcupsppdc1
 cups-client
 cups-ppdc
 cups
 libcupsdriver1
 openjdk-7-jre-headless
 openjdk-7-jre
 cups-bsd
 icedtea-7-jre-jamvm
 openjdk-7-jre-lib
E: Sub-process /usr/bin/dpkg returned an error code (1)

I've done "apt-get update" and "apt-get upgrade" and this hasn't fixed the problem:

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libcups2 : Breaks: libcups2:i386 (!= 1.5.3-0ubuntu3) but 1.5.3-0ubuntu4 is installed
 libcups2:i386 : Breaks: libcups2 (!= 1.5.3-0ubuntu4) but 1.5.3-0ubuntu3 is installed
E: Unmet dependencies. Try using -f.

© Ask Ubuntu or respective owner

Related posts about apt