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


Solution 2:

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

    echo "deb 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


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 stretch/updates main

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