我正在尝试在 docker 映像中安装 java7。这一直工作到几天前。命令是:
apt-get --fix-missing update
apt-get -y upgrade
apt-get -y install software-properties-common
add-apt-repository ppa:webupd8team/java
apt-get -y upgrade
apt-get -y update
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
apt-get install -y oracle-java7-installer
Run Code Online (Sandbox Code Playgroud)
输出是:
Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Downloading Oracle Java 7...
--2017-05-29 16:54:29-- http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 104.96.220.162, 104.96.220.106
Connecting to download.oracle.com (download.oracle.com)|104.96.220.162|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: (REMOVING H-T-T-P-S BECAUSE I DON'T HAVE ENOUGH REP POINTS)://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following]
--2017-05-29 16:54:29-- (REMOVING H-T-T-P-S BECAUSE I DON'T HAVE ENOUGH REP POINTS)://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.196.115.62, 2600:1408:10:184::2d3e, 2600:1408:10:185::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.196.115.62|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: (REMOVING H-T-T-P BECAUSE I DON'T HAVE ENOUGH REP POINTS)//download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1496076904_47c6805122b1f8131f00e210452116ca [following]
--2017-05-29 16:54:29-- http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1496076904_47c6805122b1f8131f00e21 0452116ca
Connecting to download.oracle.com (download.oracle.com)|104.96.220.162|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-05-29 16:54:31 ERROR 404: Not Found.
download failed
Oracle JDK 7 is NOT installed.
dpkg: error processing package oracle-java7-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up gsfonts (1:8.11+urwcyr1.0.7~pre44-4.2ubuntu1) ...
Setting up x11-common (1:7.7+1ubuntu8.1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for ureadahead (0.100.0-16) ...
Setting up xfonts-encodings (1:1.0.4-1ubuntu1) ...
Setting up xfonts-utils (1:7.7+1) ...
Setting up gsfonts-x11 (0.22) ...
Processing triggers for libc-bin (2.19-0ubuntu6.9) ...
Errors were encountered while processing:
oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command '/bin/sh -c apt-get install -y oracle-java7-installer' returned a non-zero code: 100
Run Code Online (Sandbox Code Playgroud)
use*_*109 22
由于 Oracle 已经移动了下载链接并且需要登录凭据才能下载旧版本的 java,请按照以下步骤安装 java 7:
1) 从http://www.oracle.com/technetwork/java/javase/下载最新的 java 版本下载/java-archive-downloads-javase7-521261.html。您将需要登录。
2)从/var/cache/oracle-jdk7-installer/中删除jdk-7uXX-linux-x64.tar.gz,其中XX是版本号。
3)使用以下命令将下载的版本移动到/var/cache/oracle-jdk7-installer/
sudo mv jdk-7u(downloadedversion)-linux-x64.tar.gz /var/cache/oracle-jdk7-installer/
Run Code Online (Sandbox Code Playgroud)
4)现在运行以下命令
sudo apt-get install oracle-java7-installer
Run Code Online (Sandbox Code Playgroud)
Anw*_*war 15
错误的原因是 Oracle 从其站点中删除了二进制文件。尽管这些版本不久前已被弃用,但直到最近,这些二进制文件仍可供下载。但他们现在把它删除了。
2017 年 6 月 2 日的 webupd8 网站对此进行了解释。Oracle 的下载页面说
2015 年 4 月之后发布的 Java SE 7 更新和 2013 年 4 月之后发布的 Java SE 6 更新仅通过 My Oracle Support 提供给 Oracle 客户(需要支持登录)。
Java SE Advanced 为用户提供商业功能、访问关键错误修复、安全修复和一般维护”。
在此处查看完整详细信息http://www.webupd8.org/2017/06/why-oracle-java-7-and-6-installers-no.html。
| 归档时间: |
|
| 查看次数: |
35110 次 |
| 最近记录: |