I was running an apt-get upgrade (not version upgrade, just normal), when I got this message:

You might want to run 'apt-get -f install' to correct these.

The following packages have unmet dependencies: icedtea-7-jre-jamvm : Depends: openjdk-7-jre-headless (= 7u51-2.4.4-0ubuntu0.13.10.1)

openjdk-7-jre : Depends: openjdk-7-jre-headless (= 7u51-2.4.4-0ubuntu0.13.10.1)

openjdk-7-jre-lib : Breaks: openjdk-7-jre-headless (< 7u45-2.4.3-1)

E: Unmet dependencies. Try using -f.

I then run as recommended "apt-get install -f" and here is the output:

Preparing to replace openjdk-7-jre-headless:amd64 7u25-2.3.12-4ubuntu3 (using .../openjdk-7-jre-headless_7u51-2.4.4-0ubuntu0.13.10.1_amd64.deb) ...

Unpacking replacement openjdk-7-jre-headless:amd64 ... dpkg: error processing /var/cache/apt/archives/openjdk-7-jre-headless_7u51-2.4.4-0ubuntu0.13.10.1_amd64.deb (--unpack):

trying to overwrite shared '/etc/java-7-openjdk/sound.properties', which is different from other instances of package openjdk-7-jre-headless:amd64

Errors were encountered while processing: /var/cache/apt/archives/openjdk-7-jre-headless_7u51-2.4.4-0ubuntu0.13.10.1_amd64.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I fix this error? Thanks


The 1st time, I ran the command, there was no output. Now, running it again, I get:

dpkg: dependency problems prevent removal of

openjdk-7-jre-headless:amd64: icedtea-7-jre-jamvm:amd64 depends on

openjdk-7-jre-headless (= 7u51-2.4.4-0ubuntu0.13.10.1).

dpkg: error processing openjdk-7-jre-headless:amd64 (--remove):

dependency problems - not removing Errors were encountered while

processing: openjdk-7-jre-headless:amd64


Try to remove previously installed openjdk-7-jre-headless:amd64 package,

sudo dpkg -r openjdk-7-jre-headless:amd64

Then try,

sudo apt-get -f install
  • I tried that. No error message came after the 1st command, but the same error as before came after the 2nd – duduklein Jan 25 '14 at 19:48
  • Post the output of 1st command? – Avinash Raj Jan 26 '14 at 2:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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