我正在尝试使用 https://github.com/h2oai/h2o-3/blob/master/Dockerfile 构建一个H2o docker映像。
它得到以下错误:
E:软件包"oracle-java8-installer"没有安装候选
命令 '/bin/sh -c echo 'DPkg::P ost-Invoke {"/bin/rm -f/var/cache/apt/archives/.deb ||true";};'|tee/etc/apt/apt.conf.d/no-cache && echo "Deb http://mirror.math.princeton.edu/pub/ubuntu Xenial Main Universe">>/etc/apt/sources.list && apt-get update -q -y && apt-get dist-upgrade -y && apt-get clean && rm -rf/var/cache/apt/&& DEBIAN_FRONTEND=noninteractive apt-get install -y wget unzip python-pip python-sklearn python-pandas python-numpy python-matplotlib software-properties-common python-software-properties && add-apt-repository -y ppa:webupd8team/java && apt-get update -q && echo debconf shared/accept-oracle-license-v1-1 select true |Debconf-set-selections && echo debconf shared/accept-oracle-license-v1-1 seen true |Debconf-set-selections && DEBIAN_FRONTEND=noninteractive apt-get install -y oracle-java8-installer && apt-get clean && wget http://h2o-release.s3.amazonaws.com/h2o/latest_stable -o latest && wget --no-check-certificate -i latest -o/opt/h2o.zip && unzip -d/opt/opt/h2o.zip && rm/opt/h2o.zip && cd/opt && cdfind . -name 'h2o.jar' | sed 's/.///;s//h2o.jar//g'
&& cp h2o.jar/opt &&/usr/bin/pip installfind . -name "*.whl"
&& CD/&& wget https://raw.githubusercontent.com/h2oai/h2o-3/master/docker/start-h2o-docker.sh &&chmod +x start-h2o-docker.sh &&wget http://s3.amazonaws.com/h2o-training/mnist/train.csv.gz &&Gunzip Train.csv.gz &&&WGET https://raw.githubusercontent.com/laurendiperna/Churn_Scripts/master/Extraction_Script.py &&WGET https://raw.githubusercontent.com/laurendiperna/Churn_Scripts/master/Transformation_Script.py &&WGEThttps://raw.githubusercontent.com/laurendiperna/Churn_Scripts/master/Modeling_Script.py' 返回非零代码:100
我假设它可能与最近的Oracle JDK许可证更新有关。
有没有办法解决构建 docker 映像时的此错误?
是的,pkg 似乎已从存储库中删除。我在 3 月 26 日创建了以下内容,并于当天成功构建......
From ubuntu:16.04
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:webupd8team/java -y
RUN apt-get update
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
RUN apt-get install -y oracle-java8-installer
今天这就是结果
Step 8/8 : RUN apt-get install -y oracle-java8-installer
---> Running in 1bba5bac63e9
Reading package lists...
Building dependency tree...
Reading state information...
Package oracle-java8-installer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source
E: Package 'oracle-java8-installer' has no installation candidate
The command '/bin/sh -c apt-get install -y oracle-java8-installer' returned a non-zero code: 100
我已经搬到了OpenJDK,正在试验Corretto。
更新:
购电协议已停产...在此处查看他们的通知: https://launchpad.net/~webupd8team/+archive/ubuntu/java
你可以改用 openjdk-8。
我遇到了类似的问题,我发现了下图,这是运行h2o流UI的预构建图像。
https://hub.docker.com/r/h2oai/h2o-open-source-k8s