![我在尝试安装、清除等时收到此错误](https://linux22.com/image/890094/%E6%88%91%E5%9C%A8%E5%B0%9D%E8%AF%95%E5%AE%89%E8%A3%85%E3%80%81%E6%B8%85%E9%99%A4%E7%AD%89%E6%97%B6%E6%94%B6%E5%88%B0%E6%AD%A4%E9%94%99%E8%AF%AF.png)
Download done.
Removing outdated cached downloads...
sha256sum mismatch jdk-8u111-linux-x64.tar.gz
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of oracle-java8-set-default:
oracle-java8-set-default depends on oracle-java8-installer; however:
Package oracle-java8-installer is not configured yet.
dpkg: error processing package oracle-java8-set-default (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
oracle-java8-installer
oracle-java8-set-default
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
由于下载的文件jdk-8u***-linux-x64.tar.gz
未通过SHA256
校验,安装程序无法执行下一步。依赖性问题。
刪除oracle-jdk8-installer
快取。
sudo rm -rf /var/cache/oracle-jdk8-installer/jdk-*
再次安装oracle-jdk8-installer
sudo apt-get install oracle-java8-installer oracle-java8-set-default
检查下载进度。jdk-8u***-linux-x64.tar.gz
文件大小可能超过 150 MB。