3

I am a new user of Linux currently using 18.04 on my HP laptop with AMD processor. Some times ago I have tried to install JDK11 from this repostiorysudo add-apt-repository ppa:linuxuprising/java then sudo apt-get update and finally hit this command sudo apt-get install oracle-java11-installer-local after doing this I have got error package is not installed, fine I closed my terminal then yesterday I am going to install sudo apt install ubuntu-restricted-extras then I have got this error every time when I use sudo apt update / sudo apt upgrade

The error which I got every time:

aus@aus-pc:~$ sudo apt install ubuntu-restricted-extras
[sudo] password for aus: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ubuntu-restricted-extras is already the newest version (66).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up oracle-java11-installer-local (11.0.4-1~linuxuprising1) ...
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)

Note: I have manually deleted URL from Software & Update Center but I got this error every time please help me. PPA reference URL: Path from I got the reference of JDK11

Thank you

1

2 Answers 2

2

Remove the package that is stuck:

sudo apt remove oracle-java11-installer-local
2
  • If that doesn't work, you can run: sudo dpkg -P oracle-java11-installer-local to try and manually uninstall it using dpkg instead of apt.
    – mchid
    Jul 29, 2019 at 7:41
  • I have used your solution and it works fine. Thanks to every one
    – Khan Usama
    Jul 29, 2019 at 17:27
0

The error says that you need to download the file jdk-11.0.4_linux-x64_bin.tar.gz. You can download the file from here. You must click to accept the license agreement and then you can click to download the file.

Assuming the file is downloaded to your ~/Downloads directory, run the following commands:

cd ~/Downloads
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/
sudo dpkg --configure -a

You must log in to answer this question.

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