Cannot install openjdk-8-jre-headless on Debian Jessie 1

Solution 1:

This worked for me:

apt install -t jessie-backports  openjdk-8-jre-headless ca-certificates-java

REF: https://unix.stackexchange.com/questions/342403/openjdk-8-jre-headless-depends-ca-certificates-java-but-it-is-not-going-to-be

Solution 2:

  1. First you need to add jessie-backports repo.

    echo "deb http://http.debian.net/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
    
  2. install commands

    sudo apt-get update
    sudo apt-get install -t jessie-backports openjdk-8-jre-headless
    
  3. switch to new java

    sudo /usr/sbin/update-java-alternatives -s java-1.8.0-openjdk-amd64
    

Reference: https://github.com/OpenTreeOfLife/germinator/wiki/Debian-upgrade-notes:-jessie-and-openjdk-8


Solution 3:

I had this problem on Debian Buster, which also doesn't have this package. Since none of the answers on this page worked for me, and the accepted answer led me to another SE answer which I also could not get to work, I just wanted to post what did work for me on Buster.

Following the instructions on the debian website, I added the following line to /etc/apt/sources.list:

deb http://security.debian.org/debian-security stretch/updates main

I was then able to sudo apt update and sudo apt install openjdk-8-jre-headless.