【发布时间】:2014-07-29 15:31:02
【问题描述】:
我正在尝试在我的 docker 映像中通过 ppa (RUN add-apt-repository ppa:webupd8team/java -y) 安装 java7,但它失败并出现此错误:
returned a non-zero code: 127
以下是正确安装的建议方法,但它不起作用。我也尝试过两个ppas。
RUN apt-get install python-software-properties -y
RUN add-apt-repository ppa:webupd8team/java -y
#RUN add-apt-repository ppa:eugenesan/java -y
RUN apt-get update
RUN apt-get install oracle-java7-installer -y
这是日志输出:
Step 28 : RUN add-apt-repository ppa:webupd8team/java -y
---> Running in b278761a4209
[91m/bin/sh: 1: add-apt-repository: not found
[0m
所以...我需要找出这个命令在哪里/是否存在于帮助程序库中或什么:
add-apt-repository
add-apt-repository 似乎是 python-software-properties 安装的一部分。除了在构建的其他区域弹出的这些消息外,我在该步骤中看不到任何真正的错误。所以我假设如果我能解决这个问题,前面提到的python步骤将根据需要安装:
[91mdebconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
[0m[91mdebconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
[0m[91mdpkg-preconfigure: unable to re-open stdin:
所以。如何设置术语或对话?我认为 -y 允许这样做
【问题讨论】: