Reputation: 8995
I always installed Oracle JDK 8 on Debian 8 using the following instructions with no problems
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
But on Debian 9 when I execute the following command
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
I get the following errors
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
How can I install Oracle JDK 8 on Debian 9?
Upvotes: 3
Views: 4699
Reputation: 847
It seems that dirmngr is not installed: gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory. You could try to install it via apt-get install dirmngr and retry.
Upvotes: 3
Reputation: 31
I was able to fix with the following commands:
Upvotes: 3
Reputation: 898
You can install it manually if you want, download the 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
make it in the environment variables of your OS:
JAVA_HOME= ~/path_Of_Your_JDK_DIR
PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME
export PATH
I hope that help you Arya.
Upvotes: 3