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。