Ubuntu has encountered the following issues when installing the JDK through the PPA source:
Download failed
Oracle JDK 8 is not installed.
Dpkg:error Processing Package Oracle-java8-installer (--configure):
Subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
Oracle-java8-installer
E:sub-process/usr/bin/dpkg returned an error code (1)
Cause of the problem:
Version mismatch
Workaround:
Execute the following command
cd/var/lib/dpkg/Infosudo sed-I.'s| java_version=8u151| java_version=8u162|'Oracle-java8-installer.*sudo sed-I.'s| partner_url=http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/| partner_url=http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/|'Oracle-java8-installer.*sudo sed-I.'s| sha256sum_tgz= "c78200ce409367b296ec39be4427f020e2c585470c4eed01021feada576f027f" | sha256sum_tgz= "68ec82d47fd9c2b8eb84225b6db398a72008285fafc98631b1ff8d2229680257" |'Oracle-java8-installer.*sudo sed-I.'s| j_dir=jdk1.8.0_151| j_dir=jdk1.8.0_162|'Oracle-java8-installer.*
Re-install again
sudo Install oracle-java8-installersudoinstall Oracle-java8-set-default
Reference:
Https://stackoverflow.com/questions/43587635/dpkg-error-processing-package-oracle-java8-installer-configure
See second answer, released by user hrvoj3e
Error processing Package Oracle-java8-installer problem solving