I'm a Linux noob, and I trying to follow a variety of articles on installing Java 8 on Debian 8 (Jessie):
However, I get a bunch of dependency errors preventing me from installing openjdk-8-jre.
apt-get -f install openjdk-8-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
openjdk-8-jre : Depends: openjdk-8-jre-headless (= 8u162-b12-1~bpo8+1)
Depends: libglib2.0-0 (>= 2.24) but it is not going to be installed
Depends: libxrandr2 but it is not going to be installed
Depends: libxinerama1 but it is not going to be installed
Depends: libgl1-mesa-glx but it is not going to be installed or
libgl1
Depends: libgtk-3-0 but it is not going to be installed
Depends: libatk-wrapper-java-jni (>= 0.30.4-0ubuntu2) but it is not going to be installed
Depends: libasound2 (>= 1.0.16)
Depends: libgif4 (>= 4.1.4) but it is not going to be installed
Depends: libpulse0 (>= 0.99.1) but it is not going to be installed
Depends: libxext6 but it is not going to be installed
Recommends: fonts-dejavu-extra but it is not going to be installed
Other configuration information:
cat /proc/version:
head
Linux version 3.16.0-5-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.51-3+deb8u1 (2018-01-08)
cat /etc/*-release
ID=azure
AZURE_IMAGE_VERSION="8.0.201804150"
BUILD_INFO_URL="https://azure-build.debian.net/job/image-jessie/933/"
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
/etc/apt# head -999 sources.list
deb http://debian-archive.trafficmanager.net/debian jessie main
deb-src http://debian-archive.trafficmanager.net/debian jessie main
deb http://debian-archive.trafficmanager.net/debian-security jessie/updates main
deb-src http://debian-archive.trafficmanager.net/debian-security jessie/updates main
deb http://debian-archive.trafficmanager.net/debian jessie-updates main
deb-src http://debian-archive.trafficmanager.net/debian jessie-updates main
deb http://debian-archive.trafficmanager.net/debian jessie-backports main
deb-src http://debian-archive.trafficmanager.net/debian jessie-backports main
deb http://ftp.debian.org/debian jessie-backports main
/etc/apt/sources.list.d# head -999 *
==> jessie-backports.list <==
deb http://http.debian.net/debian jessie-backports main
==> matrix.list <==
deb https://matrix.org/packages/debian/ jessie main
deb-src https://matrix.org/packages/debian/ jessie main
==> webupd8team-java.list <==
deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main
I don't know how to diagnose the problem and resolve it. Can somebody point me in the right direction?
Answering my own question; in hopes it might help somebody else; because I spent 2+ days being frustrated.
It turns out that the reason it was failing is there is another package that I was trying to install that was dependent on Java8. The fact that this package was trying to install, is what prevented Java8 from being installed. Only after I did a:
apt-get --purge remove packagename
Java could then install. Once java was installed, I could then reinstall the offending package.
Another solution is sudo apt-get purge openjdk-\\* -y
I wrote a shell script that does everything including removing other versions of Java. See: https://github.com/Nat-As/installjava8
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.