【发布时间】:2019-04-29 09:18:49
【问题描述】:
我们有一个 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
【问题讨论】:
-
问题可能在您的来源列表中。还可以尝试从 apt-get update 中删除
-qq。可能会有一些警告。从手册页:you should never use -qq without a no-action modifier such as -d, --print-uris or -s as APT may decide to do something you did not expect.另外,这个问题可能更适合不同的页面:superuser.com/questions/tagged/aptitude -
@NeplatnyUdaj 是的,我们也尝试在没有 -qq、-f、-y 的终端中,结果相同。