Reputation: 377
Below is the Error message I get every time I install anything in the terminal . Its kinda stuck there for a while.
I tried no. of solutions from StackOverflow but nothing worked.
Before installing this package, please download the Oracle JDK 11 .tar.gz file with the same version as this package (version 11.0.4), and place it in /var/cache/oracle-jdk11-installer-local,
E.g.:
sudo mkdir -p /var/cache/oracle-jdk11-installer-local
sudo cp jdk-11.0.4_linux-x64_bin.tar.gz /var/cache/oracle-jdk11-installer-local/
sha256sum mismatch jdk-11.0.4_linux-x64_bin.tar.gz
Oracle JDK 11 is NOT installed.
dpkg: error processing package oracle-java11-installer-local (--configure):
installed oracle-java11-installer-local package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
oracle-java11-installer-local
E: Sub-process /usr/bin/dpkg returned an error code (1)
Doesn't show up again.
Upvotes: 23
Views: 45302
Reputation: 13
I have managed to resolve the issue by doing this:
/var/lib/dpkg/info/oracle-java11-installer-local.postinst
3. change the version in 2 places
4. save and update apt
5. then sudo apt install oracle-java11-installer-local
this worked for me
Upvotes: 1
Reputation: 1
Navigating to the directory var/cache and doing "sudo rmdir oracle-jdk11-installer-local/" worked for me.
sudo rmdir oracle-jdk11-installer-local/
Upvotes: 0
Reputation: 11
After a long search: this solved it for me. The checksum made the issues for me. Try:
sudo rm /var/lib/dpkg/info/oracle-java11-installer-local.postinst -f
Upvotes: 1
Reputation: 943
found this solution:
sudo rm /var/lib/dpkg/info/oracle-java11-installer-local.postinst
at this site.
Upvotes: 15
Reputation: 105
You need to download the folder of the Oracle JDK 11 on here https://www.oracle.com/java/technologies/javase-jdk11-downloads.html After download the tar.gz file. Move to your folder location then copy the file by using this command
sudo cp jdk-11.0.6_linux-x64_bin.tar.gz /var/cache/oracle-jdk11-installer-local/
don't forget to check your file name! After that repeat again by typing
sudo apt-get install oracle-java11-installer-local
and you can check your java version after that by typing
java -version
Upvotes: 7
Reputation: 79
I had the same issue. My solution was to download jdk-11.0.5_linux-x64_bin.tar.gz and copied it to /var/cache/oracle-jdk11-installer-local.
In console shell, type:
sudo apt update && sudo apt upgrade
Upvotes: 1
Reputation: 324
Hello,
I've had the same issue.
When you try to run sudo apt update && sudo apt upgrade
it will automatically try to update the Java if a newer version is available. In my case let's say from 11.0.4 -> 11.0.5.
If you add the JDK from Oracle (after download) to /var/cache/oracle-jdk11-installer-local/
it should work.
You don't have to uninstall it...(I mean the oracle-jdk11-installer-local, it works just fine).
Please let me know if you still have this issue.
Upvotes: 1
Reputation: 479
Remove the package oracle-java11-installer-local
. You can do this in following way:
sudo apt remove oracle-java11-installer-local
Upvotes: 47