我正在尝试在Docker容器中的Ubuntu基础镜像上安装Java 8。我运行以下命令:
RUN apt-get update && \
apt-get install -y software-properties-common python-software-properties && \
add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" && \
apt-get update && \
echo "$accept-license" | sudo debconf-set-selections && \
apt-get install --allow-unauthenticated -y oracle-java8-installer && \
rm -rf /var/lib/apt/lists/* && rm -rf /var/cache/oracle-jdk8-installer
运行上述命令时,我遇到了以下错误:
Connecting to download.oracle.com (download.oracle.com)|23.57.66.26|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-10-20 06:29:41 ERROR 404: Not Found.
下载失败
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
感谢您,Farhan。