我总是使用以下说明在Debian 8上安装Oracle JDK 8而没有任何问题
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
但是当我执行以下命令时,在Debian 9上
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
我收到以下错误
root@debian:/etc/apt/sources.list.d# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
Executing: /tmp/apt-key-gpghome.OEi3EFigqe/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpg: connecting dirmngr at '/tmp/apt-key-gpghome.OEi3EFigqe/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr
如何在Debian 9上安装Oracle JDK 8?
答案 0 :(得分:3)
如果需要,您可以手动安装, 下载JDK8
wget --no-cookies --no-check-certificate --header "Cookie:oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
在操作系统的环境变量中创建:
JAVA_HOME= ~/path_Of_Your_JDK_DIR
PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME
export PATH
我希望能帮助你Arya。
答案 1 :(得分:3)
我能够修复以下命令:
答案 2 :(得分:3)
似乎没有安装dirmngr:gpg:无法启动dirmngr' / usr / bin / dirmngr':没有这样的文件或目录。您可以尝试通过apt-get install dirmngr安装它并重试。