在 Ubuntu 18.04.1 LTS 上安装 jdk-11.0.1-2000:11.0.1-ga.x86_64 时出现依赖错误

在 Ubuntu 18.04.1 LTS 上安装 jdk-11.0.1-2000:11.0.1-ga.x86_64 时出现依赖错误

尝试在 Ubuntu 18.04.1 上安装 JDK-11.0.1 依赖项失败。我已将列表与指示的目录进行匹配,未发现任何缺失的项目。

这是使用的命令:

sudo rpm -Uvh /home/tom/Downloads/jdk-11.0.1_linux-x64_bin.rpm

该 rpm 是直接从 Oracle 下载的。

我错过了什么?

消息说使用 Alien 而不是 rpm。什么是 Alien,我应该使用什么命令字符串来安装此 rpm?

tom@user-UX31E:/bin$ sudo rpm -Uvh /home/tom/Downloads/jdk-11.0.1_linux-x64_bin.rpm
rpm: RPM should not be used directly install RPM packages, use Alien instead!
rpm: However assuming you know what you are doing...
warning: /home/tom/Downloads/jdk-11.0.1_linux-x64_bin.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
error: Failed dependencies:
    /bin/basename is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /bin/cat is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /bin/cp is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /bin/gawk is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /bin/grep is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /bin/ln is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /bin/ls is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /bin/mkdir is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /bin/mv is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /bin/pwd is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /bin/rm is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /bin/sed is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /bin/sort is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /bin/touch is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /usr/bin/cut is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /usr/bin/dirname is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /usr/bin/expr is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /usr/bin/find is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /usr/bin/tail is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /usr/bin/tr is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /usr/bin/wc is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
    /bin/sh is needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
tom@user-UX31E://$ 

答案1

如错误消息所示,不应使用 RPM 在 Ubuntu 中安装软件包。应使用 alien 将软件包转换为 Debain 格式 (.deb),然后从 .deb 文件安装。

相关内容