2

I am trying to install anything in Ubuntu 18.04 and I get this error trying to install rar It's happend with so many programs

ivan@ivan-X441UVK:~$ sudo apt-get install rar
Reading package lists... Done
Building dependency tree       
Reading state information... Done
rar is already the newest version (2:5.5.0-1).
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-java10-installer (10.0.2-1~linuxuprising+2) ...
Using wget settings from /var/cache/oracle-jdk10-installer/wgetrc
Downloading Oracle Java 10...
--2018-10-18 01:09:56--  http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_linux-x64_bin.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.59.80.142
Connecting to download.oracle.com (download.oracle.com)|23.59.80.142|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_linux-x64_bin.tar.gz [following]
--2018-10-18 01:09:56--  https://edelivery.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_linux-x64_bin.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 104.91.146.78, 2600:1419:10:185::2d3e, 2600:1419:10:189::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.91.146.78|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_linux-x64_bin.tar.gz?AuthParam=1539843116_9746d734e74d2667e722d6f85f1cb0a3 [following]
--2018-10-18 01:09:56--  http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_linux-x64_bin.tar.gz?AuthParam=1539843116_9746d734e74d2667e722d6f85f1cb0a3
Connecting to download.oracle.com (download.oracle.com)|23.59.80.142|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-10-18 01:09:58 ERROR 404: Not Found.

download failed
Oracle JDK 10 is NOT installed.
dpkg: error processing package oracle-java10-installer (--configure):
 installed oracle-java10-installer package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 oracle-java10-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
2
  • Try sudo apt-get update then try again! Oct 18, 2018 at 6:49
  • Are you saying that you want to prevent Oracle JDK 10 from trying (and failing) to install every time? Did you still want some form of JDK to install? Or did you already install JDK some other way?
    – user535733
    Oct 18, 2018 at 11:33

3 Answers 3

2

There is a not fully installed or removed package. For solution just delete or uninstall it.

Use:

sudo apt-get purge "package name"
In my case I used:
sudo apt-get purge oracle-java10-installer

1
  • In this specific case it's because Oracle modified it's website and how the JRE/JDK download works with respect to accepting their license agreement. Jan 29, 2019 at 9:44
1

Solution#1

Uninstall JDK first. Then check source.list in /etc/apt/ folder, remove any line containing jdk path. After that do sudo apt-get update. And then sudo apt-get -f install

Solution#2

Before installing anything run the following command.

sudo apt-get -f install

what does it do? It installs all the dependent packages that weren't installed when installing the previous package. sudo apt-get -f install this will fix your issue

3
  • It did not work. I got the same error Oct 18, 2018 at 7:08
  • Uninstall JDK first. Then check source.list in /etc/apt/ folder, remove any line containing jdk path. After that do sudo apt-get update. And then sudo apt-get -f install
    – Abdulla
    Oct 18, 2018 at 7:12
  • GENIOUS!!!! It works. I just used sudo apt-get purge oracle-java10-installer Oct 18, 2018 at 7:22
0

My solution was:

rm /var/lib/dpkg/info/$name_of_package -f

You must log in to answer this question.

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