无法获取oracle-java8-installer的Java包

时间:2019-04-29 09:18:49

标签: java linux ubuntu debian

我们有一个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

2 个答案:

答案 0 :(得分:2)

不幸的是,由于Oracle更改了其许可程序,您无法再安装oracje-java8。

您可以使用openJDK

apt-get install openjdk-8-jdk

在这里您可以找到有关该问题的其他信息:https://launchpad.net/~webupd8team/+archive/ubuntu/java

答案 1 :(得分:0)

两种方式 1。 从here下载Java oracle

然后转到您的Java目录

例如:cd / root / java

然后做

# makepkg -s

2。 从here下载yay,然后转到yay目录

例如:cd / root / Downloads / yay 在终端的yay目录中执行:

# makepkg -si

安装丢失的东西后可以做

yay install jre