libpng-dev Installation error [duplicate]

oracle-java8-installer is already the newest version

That's the error message that you get when you try to install the same package twice because the package is already installed. To prove it run the following command to show whether oracle-java8-installer is installed:

apt policy oracle-java8-installer  

When you tried to install oracle-java8-installer you got the following error message:

Download done.
Removing outdated cached downloads...
sha256sum mismatch jdk-8u151-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
Errors were encountered while processing: oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

apt says that oracle-java8-installer is installed but java -version can't find java, so it must not have been installed correctly due to the sha256sum mismatch error which means that jdk-8u151-linux-x64.tar.gz was not downloaded correctly by the oracle-java8-installer script.

You might be having the same problem that others have that the oracle-java8-installer script isn't working properly: when i try to install or remove any softwares itis errer will occure please anyone help me so visit the official Oracle Java 9 website, download jdk-9.0.1_linux-x64_bin.tar.gz from there, and install it by following the instructions in this answer: How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?.