I am trying to install openjdk-11-jre-headless or default-jre on my ubuntu machine but no mather what I do I get some error messages while doing it.
" The following packages have unmet dependencies:
openjdk-11-jre-headless : Depends: initscripts but it is not installable
E: Unable to correct problems, you have held broken packages "
" The following packages have unmet dependencies:
default-jre : Depends: default-jre-headless (= 2:1.11-68ubuntu1~18.04.1) but it is not going to be installed
Depends: openjdk-11-jre but it is not going to be installed
E: Unable to correct problems, you have held broken packages. "
I have tried already these commands to fix the problem but no luck..
- sudo apt-get update --fix-missing
- sudo apt-get update
- sudo apt-get clean
- sudo apt-get autoremove
- sudo dpkg reconfigure -a
- sudo apt install -f
I tried the same thing with aptitude:
- aptitude install default-jre but no luck...
Any ideas how to fix the " broken package " and dependency issuses?
Detailed system information
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
Apt-update:
- Hit:1 example/packages/live/example bionic InRelease
- Hit:2 ee.archive.ubuntu.com/ubuntu bionic InRelease
- Hit:3 ee.archive.ubuntu.com/ubuntu bionic-updates InRelease
- Hit:4 ee.archive.ubuntu.com/ubuntu bionic-backports InRelease
- Hit:5 ee.archive.ubuntu.com/ubuntu bionic-security InRelease
- Hit:6 ppa.launchpad.net/nginx/stable/ubuntu trusty InRelease
- Hit:7 ppa.launchpad.net/openjdk-r/ppa/ubuntu trusty InRelease
- Hit:8 adoptopenjdk.jfrog.io/adoptopenjdk/deb bionic InRelease
- take note -example is a valid repo i chose to rename–
Reading package lists... Done Building dependency tree Reading state information...
Done All packages are up to date.
Screenshot of apt-cache policy:
- apt-cache policy default-jre
- apt-cache policy default-jre-headless
- apt-cache policy openjdk-11-jre