1

Recently I have been getting this warning icon on my top bar. Clicking on it tells me:

An error occurred, please run Package Manager from the right-click menu or apt-get in a terminal to see what is wrong. The error message was: 'Error: BrokenCount > 0.' This usually means that your installed packages have unmet dependencies.

When I run apt update in a terminal, everything is fine and I get no errors. But when I run apt upgrade or apt --fix-broken install I get the following error message:

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 openjdk-11-jdk-headless : Depends: openjdk-11-jre-headless (= 11~19-1~18.04) but 11~7-1ubuntu1 is installed
 openjdk-11-jre : Depends: openjdk-11-jre-headless (= 11~19-1~18.04) but 11~7-1ubuntu1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I don't know how to fix the problem. I can not run updates and upgrades on the machine.

2
  • Try to update openjdk-11-jre-headless. If that doesn't work: remove openjdk-11-jre-headless and do apt --fix-broken install again. – Jos Jun 29 '18 at 14:00
  • Running sudo apt remove openjdk-11-jre-headless also brings up an error.` The following packages have unmet dependencies: default-jre-headless : Depends: openjdk-11-jre-headless but it is not going to be installed openjdk-11-jdk-headless : Depends: openjdk-11-jre-headless (= 11~19-1~18.04) but it is not going to be installed openjdk-11-jre : Depends: openjdk-11-jre-headless (= 11~19-1~18.04) but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). – tamrat Jun 29 '18 at 14:08
1

I was also facing the same issue. Fixed the issue by following steps;

  1. Went to Software & Updates.
  2. Navigate to "Other Software" Tab.
  3. Unchecked the entry "http://ppa.launchpad.net/openjdk-r/ppa/ubuntu bionic main"

Pressed the Close button.

After that, I ran following commands.

sudo apt-get upgrade
sudo apt-get update

Done.

2
  • Thanks, this does indeed fix the problem. But does this mean I will no longer get updates to Java using apt? – tamrat Jul 1 '18 at 7:42
  • @tamrat: check again the same entry to install Java. – Gabriel Belingueres Aug 28 '18 at 18:46
1

this resolved for me.

  1. Went to Software & Updates.
  2. Navigate to "Other Software" Tab.
  3. remove http://ppa.launchpad.net/openjdk-r/ppa/ubuntu
  4. sudo apt-get autoremove openjdk-1*
  5. sudo apt-get upgrade && sudo apt-get update

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.