0

I'm trying to install java 8 in my Ubuntu 16.4 using Docker file but I get the below error -

Connecting to download.oracle.com (download.oracle.com)|65.202.184.96|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-10-19 15:34:18 ERROR 404: Not Found.

Dockerfile

FROM ubuntu:16.04

ENV GOSU_VERSION 1.9
ENV SPARK_VERSION 2.0.2
ENV SPARK_HOME /usr/local/spark
ENV SPARK_USER aml
ENV GLIBC_APKVER 2.24-r0
ENV LANG=en_US.UTF-8

LABEL vendor=ActionML \
      version_tags="[\"1.6\",\"1.6.3\"]"


ENV JAVA_HOME       /usr/lib/jvm/java-8-oracle


RUN apt-get update && \
  apt-get dist-upgrade -y


RUN \
  echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
  apt-get install -y software-properties-common && \
  add-apt-repository -y ppa:webupd8team/java && \  
  apt-get update && \
  apt-get install -y oracle-java8-installer && \
  rm -rf /var/lib/apt/lists/* && \
  rm -rf /var/cache/oracle-jdk8-installer
user1050619
  • 19,822
  • 85
  • 237
  • 413

2 Answers2

0
  1. As root, go to this folder: /etc/apt/sources.list.d Locate this file: webupd8team-java.list and delete it.

  2. Execute sudo apt-get update for the system to remove any reference to that update server.

  3. Execute add-apt-repository ppa:webupd8team/java to add the correct ppa to your system.

  4. Execute sudo apt-get update again and you should be able to install everything correctly.

Theotonio
  • 218
  • 1
  • 5
  • I believe this is the problem - https://stackoverflow.com/questions/46815897/jdk-8-is-not-installed-error-404-not-found – user1050619 Oct 19 '17 at 17:58
0

FYI- As of this morning, the Webupd8 Oracle-java8-installer is successfully downloading and installing in docker for me. The links in the PPA installer must have been updated. Yay!

Ziska220
  • 93
  • 1
  • 7