我们有一个Vagrant Debian盒子,可以选择安装Java和Solr 6.6。该安装设置一直有效,直到上个月。现在我们无法安装Java。
安装过程:
java-8-debian.list
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
在我们的Provision.sh文件中:
sudo cp /vagrant/provisioning/java-8-debian.list /etc/apt/sources.list.d/java-8-debian.list;
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886;
sudo apt-get -qq update
sudo apt-get install -qq -f -y python-software-properties software-properties-common debconf-utils unzip
sudo debconf-set-selections <<< "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true"
现在我们有一个错误:
~$ sudo apt-get install -f -y oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package oracle-java8-installer
如何修复或定位软件包?
编辑:
我们还在没有-qq,-f,-y的终端中尝试,结果是相同的。
~$ sudo apt-get update
Hit http://ftp.hosteurope.de jessie InRelease
Hit http://ftp.hosteurope.de jessie InRelease
Hit http://ppa.launchpad.net trusty InRelease
Hit https://packages.sury.org jessie InRelease
Hit https://deb.nodesource.com jessie InRelease
Hit http://ftp.hosteurope.de jessie/main amd64 Packages
Hit http://security.debian.org jessie/updates InRelease
Hit http://ftp.hosteurope.de jessie/main i386 Packages
Hit http://ftp.hosteurope.de jessie/main ppc64el Packages
Hit http://ftp.hosteurope.de jessie/main amd64 Packages
Ign http://httpredir.debian.org jessie InRelease
Hit http://ftp.hosteurope.de jessie/main i386 Packages
Hit http://ppa.launchpad.net trusty/main Sources
Hit https://packages.sury.org jessie/main amd64 Packages
Hit http://ftp.hosteurope.de jessie/main ppc64el Packages
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit https://deb.nodesource.com jessie/main Sources
Hit https://deb.nodesource.com jessie/main amd64 Packages
Hit http://httpredir.debian.org jessie Release.gpg
Hit http://security.debian.org jessie/updates/main Sources
Hit http://security.debian.org jessie/updates/contrib Sources
Hit http://security.debian.org jessie/updates/main amd64 Packages
Hit http://security.debian.org jessie/updates/contrib amd64 Packages
Hit http://httpredir.debian.org jessie Release
Hit http://httpredir.debian.org jessie/main Sources
Hit http://httpredir.debian.org jessie/contrib Sources
Hit http://httpredir.debian.org jessie/main amd64 Packages
Hit http://httpredir.debian.org jessie/contrib amd64 Packages
Reading package lists... Done
答案 0 :(得分:2)
不幸的是,由于Oracle更改了其许可程序,您无法再安装oracje-java8。
您可以使用openJDK
apt-get install openjdk-8-jdk
在这里您可以找到有关该问题的其他信息:https://launchpad.net/~webupd8team/+archive/ubuntu/java
答案 1 :(得分:0)