2

When I was installing java jdk using sudo apt-get install build-essential

I was getting the error 404 the file was not found after I followed the solution given in

Can't install Oracle JDK 9 which is to change all files oracle-java9-installer.* change version numbers and SHA256SUM_TGZ as below

177-> 178

arm32: c24e8a5ce4dcf77d6e01362ae2d0a57997bb5018da1d74b6934e050d9d3515c7

arm64: 9839c453b7321e491ee752f2e612ca570caaffcf84cf07bf3776f388bb1ecdba

the installation fails in post installation :

Download done.
Removing outdated cached downloads...
sha256sum mismatch jdk-9+178_linux-x64_bin.tar.gz
Oracle JDK 9 is NOT installed.
dpkg: error processing package oracle-java9-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 oracle-java9-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

Is there any way to fix this?

I am running Ubuntu 16.04

Zanna
  • 70,465
  • for now i disabled the checksum error and the installation went through. considering i just started using ubuntu .. I want to learn the correct approach. Thanks for all the responses – Saeed Manaffam Jul 24 '17 at 22:30
  • Please clarify the order of events. You installed build-essential (why?), you got a 404 error, you used the Ask Ubuntu answer to edit the sha256sum, then you got the error last mentioned, right? – Zanna Jul 25 '17 at 04:30
  • I needed build-essential for opencv installation; and yes after the edit appraently the check sum function in post intallation throw the error – Saeed Manaffam Jul 26 '17 at 18:27

1 Answers1

0

I stuck in this problem almost 1 week.

 sudo apt-get purge oracle-java9-installer

solved my issue. Later I also changed Ubuntu Software center server to "Main Server".