[英]How to resolve issue related to installing Java 8 on Debian 8 (Jessie)?
我是Linux新手,並且嘗試閱讀有關在Debian 8(Jessie)上安裝Java 8的各種文章:
但是,我遇到了一堆依賴項錯誤,無法安裝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
其他配置信息:
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
我不知道如何診斷和解決問題。 有人可以指出我正確的方向嗎?
回答我自己的問題; 希望它可以對其他人有所幫助; 因為我花了超過2天的時間感到沮喪。
事實證明,失敗的原因是我嘗試安裝的另一個依賴Java8的軟件包。 該軟件包試圖安裝的事實阻止了Java8的安裝。 只有在我做過之后:
apt-get --purge remove packagename
然后可以安裝Java。 一旦安裝了Java,我就可以重新安裝有問題的軟件包。
另一個解決方案是sudo apt-get purge openjdk-\\* -y
我編寫了一個shell腳本,該腳本可以完成所有工作,包括刪除其他Java版本。 參見: https : //github.com/Nat-As/installjava8
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.