![JRE 安装损坏,有什么修复建议吗?](https://linux22.com/image/1133579/JRE%20%E5%AE%89%E8%A3%85%E6%8D%9F%E5%9D%8F%EF%BC%8C%E6%9C%89%E4%BB%80%E4%B9%88%E4%BF%AE%E5%A4%8D%E5%BB%BA%E8%AE%AE%E5%90%97%EF%BC%9F.png)
这是一个很长的虚假传奇来解释我是如何来到这里的,但是我在我的 Ubuntu 机器上安装了错误的 JRE 1.8.0-71,并且--force-remove-reinstreq
无法工作:
# sudo dpkg --remove --force-remove-reinstreq jre1.8.0-71
(Reading database ... 633119 files and directories currently installed.)
Removing jre1.8.0-71 (1.8.071-1) ...
find: `/usr/java/*': No such file or directory
/var/lib/dpkg/info/jre1.8.0-71.postrm: line 586: /usr/sbin/alternatives: No such file or directory
dpkg: error processing package jre1.8.0-71 (--remove):
subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
jre1.8.0-71
帮助?
答案1
答案如下:从 /usr/bin/update-alternatives 到 /usr/sbin/alternatives 建立符号链接,使用 dpkg --purge,然后删除该符号链接:
https://stackoverflow.com/questions/33635075/remove-broken-java-installation-linux