如何彻底重新安装 Java?

如何彻底重新安装 Java?

我尝试在 Ubuntu 18.04 中安装 Java 11,第一次安装过程崩溃。然后我再次尝试安装 Java,但出现了如下错误。

sudo mkdir -p /var/cache/oracle-jdk11-installer-local
sudo cp jdk-11.0.4_linux-x64_bin.tar.gz /var/cache/oracle-jdk11-installer-local/
sha256sum mismatch jdk-11.0.4_linux-x64_bin.tar.gz
Oracle JDK 11 is NOT installed.
dpkg: error processing package oracle-java11-installer-local (--configure):
 installed oracle-java11-installer-local package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 oracle-java11-installer-local
E: Sub-process /usr/bin/dpkg returned an error code (1)

我该如何解决?

相关内容