0

I've a problem updating my Ubuntu pc. Every time I launch the command to update, the terminal return this:

15 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/79,3 MB of archives.
After this operation, 324 MB of additional disk space will be used.
Preconfiguring packages ...
Setting up oracle-java8-installer (8u171-1~webupd8~0) ...
Installing from local file /var/cache/oracle-jdk8-installer/jdk-8u171-linux-x64.
tar.gz
Removing outdated cached downloads...
sha256sum mismatch jdk-8u171-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)

What can I do in order to solve this problem?

0

1 Answer 1

0

Make sure to check in the /usr/lib/jvm/java-8-oracle/ folder and remove the lingering Java folder which will be named after the latest Java folder on your machine. Replace the {current-java-version_folder} with the name of that folder, and run this command:

sudo rm -r /usr/lib/jvm/java-8-oracle/{current-java-version_folder}

Then install Java again:

sudo apt-get install -f
sudo apt-get purge oracle-java8-installer
sudo apt-get install oracle-java8-installer

Then follow up with:

sudo apt-get install oracle-java8-set-default
2
  • I've tried to launch the command listed, but after the removing of the "java folder", when I write "sudo apt-get install -f" this error is returned: [Errors were encountered while processing: oracle-java8-installer E: Sub-process /usr/bin/dpkg returned an error code (1)] Apr 26, 2018 at 10:55
  • Since ```sudo apt-get install -f```` is meant to fix broken packages, you can skip this command since you have removed the lingering Java packages.
    – Ali Nobari
    Apr 26, 2018 at 16:49

Not the answer you're looking for? Browse other questions tagged .