1

我正在尝试将 rpm 包安装java-1.8.0-amazon-corretto-devel-1.8.0_192.b12-1.amzn2.x86_64.rpmcentos 7 OS.

我已经rpm java-1.8.0-amazon-corretto-devel-1.8.0_192.b12-1.amzn2.x86_64.rpmhttps://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html下载了

尝试使用命令安装时

rpm -ivh java-1.8.0-amazon-corretto-devel-1.8.0_192.b12-1.amzn2.x86_64.rpm

我收到以下错误:

warning: java-1.8.0-amazon-corretto-devel-1.8.0_192.b12-1.amzn2.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID c87f5b1a: NOKEY
error: Failed dependencies:
    java-1.8.0-amazon-corretto(x86-64) = 1:1.8.0_192.b12-1.amzn2 is needed by java-1.8.0-amazon-corretto-devel-1:1.8.0_192.b12-1.amzn2.x86_64
    libX11.so.6()(64bit) is needed by java-1.8.0-amazon-corretto-devel-1:1.8.0_192.b12-1.amzn2.x86_64
    libawt.so()(64bit) is needed by java-1.8.0-amazon-corretto-devel-1:1.8.0_192.b12-1.amzn2.x86_64
    libawt_xawt.so()(64bit) is needed by java-1.8.0-amazon-corretto-devel-1:1.8.0_192.b12-1.amzn2.x86_64
    libawt_xawt.so(SUNWprivate_1.1)(64bit) is needed by java-1.8.0-amazon-corretto-devel-1:1.8.0_192.b12-1.amzn2.x86_64
    libjava.so()(64bit) is needed by java-1.8.0-amazon-corretto-devel-1:1.8.0_192.b12-1.amzn2.x86_64
    libjvm.so()(64bit) is needed by java-1.8.0-amazon-corretto-devel-1:1.8.0_192.b12-1.amzn2.x86_64

知道如何下载所需的 rpm java-1.8.0-amazon-corretto-devel-1.8.0_192.b12-1.amzn2.x86_64.rpm吗?我尝试使用 yumdownloader,但它没有用。

yumdownloader --destdir=. --resolve java-1.8.0-amazon-corretto-devel-1.8.0_192.b12-1.amzn2.x86_64.rpm
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
 * base: ftp.heanet.ie
 * extras: ftp.heanet.ie
 * updates: ftp.heanet.ie
No Match for argument java-1.8.0-amazon-corretto-devel-1.8.0_192.b12-1.amzn2.x86_64.rpm
Nothing to download

谢谢

4

1 回答 1

2

有两个包,一个提供JDK,一个提供JRE。如果需要 JDK,还需要安装 JRE。

  1. 从Amazon Corretto 的下载页面下载这两个 RPM 。

  2. 使用yum localinstall同时安装两者:

    sudo yum localinstall -y java-1.8.0-amazon-corretto*.rpm
    
于 2018-11-21T22:50:09.383 回答