无法在我的 Ubuntu 16.04 LTS 中安装 JDK

无法在我的 Ubuntu 16.04 LTS 中安装 JDK

我尝试使用 alien 安装 JDK 和 JRE 并将其转换为.deb文件.rpm。操作如下

(Reading database ... 209313 files and directories currently installed.)
Preparing to unpack jdk1.8.0-112_1.8.0112-fcs-1_amd64.deb ...
Unpacking jdk1.8.0-112 (1.8.0112-fcs-1) over (1.8.0112-fcs-1) ...
/var/lib/dpkg/info/jdk1.8.0-112.postrm: line 586: /usr/sbin/alternatives: No such file or directory
/var/lib/dpkg/info/jdk1.8.0-112.postrm: line 598: /usr/sbin/alternatives: No such file or directory
dpkg: warning: subprocess old post-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
find: '/usr/java/*': No such file or directory
/var/lib/dpkg/tmp.ci/postrm: line 586: /usr/sbin/alternatives: No such file or directory
/var/lib/dpkg/tmp.ci/postrm: line 598: /usr/sbin/alternatives: No such file or directory
dpkg: error processing archive jdk1.8.0-112_1.8.0112-fcs-1_amd64.deb (--install):
subprocess new post-removal script returned error exit status 127
find: '/usr/java/*': No such file or directory
/var/lib/dpkg/tmp.ci/postrm: line 586: /usr/sbin/alternatives: No such file or directory
/var/lib/dpkg/tmp.ci/postrm: line 598: /usr/sbin/alternatives: No such file or directory
dpkg: error while cleaning up:
subprocess new post-removal script returned error exit status 127
Errors were encountered while processing:
jdk1.8.0-112_1.8.0112-fcs-1_amd64.deb*

它打开包装并说

E: The package jdk1.8.0-112 needs to be reinstalled, but I can't find an archive for it

我曾经突然停止将 .rpm 转换为 .deb,并尝试安装部分转换的 .deb 文件。这会导致问题吗?该怎么办?**

相关内容