2

Whenever I try to install anything, it fails with this the following:

Fetched 2,203 kB in 6s (352 kB/s)                                                                                                                                       
Selecting previously unselected package sgml-data.
(Reading database ... 305823 files and directories currently installed.)
Preparing to unpack .../0-sgml-data_2.0.10_all.deb ...
Unpacking sgml-data (2.0.10) ...
Selecting previously unselected package docbook-xml.
Preparing to unpack .../1-docbook-xml_4.5-8_all.deb ...
Unpacking docbook-xml (4.5-8) ...
Selecting previously unselected package libept1.5.0:amd64.
Preparing to unpack .../2-libept1.5.0_1.1+nmu3build1_amd64.deb ...
Unpacking libept1.5.0:amd64 (1.1+nmu3build1) ...
Selecting previously unselected package librarian0.
Preparing to unpack .../3-librarian0_0.8.1-6_amd64.deb ...
Unpacking librarian0 (0.8.1-6) ...
Selecting previously unselected package rarian-compat.
Preparing to unpack .../4-rarian-compat_0.8.1-6_amd64.deb ...
Unpacking rarian-compat (0.8.1-6) ...
Selecting previously unselected package synaptic.
Preparing to unpack .../5-synaptic_0.84.2_amd64.deb ...
Unpacking synaptic (0.84.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu2) ...
Setting up librarian0 (0.8.1-6) ...
Processing triggers for sgml-base (1.29) ...
Setting up libept1.5.0:amd64 (1.1+nmu3build1) ...
Processing triggers for bamfdaemon (0.5.3+17.04.20170406-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for libc-bin (2.24-9ubuntu2.2) ...
Processing triggers for doc-base (0.10.7) ...
Scrollkeeper was installed, forcing re-registration of all documents.
Unregistering 49 doc-base files, re-registering 49 doc-base files...
Registering documents with scrollkeeper...
Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ...
Downloading Oracle Java 7...
--2017-09-04 07:04:23--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 113.171.234.40, 113.171.234.90
Connecting to download.oracle.com (download.oracle.com)|113.171.234.40|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following]
--2017-09-04 07:04:23--  https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 104.67.56.226
Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.67.56.226|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1504483583_97bb82bbaaf46a2902e1ecf4986c0114 [following]
--2017-09-04 07:04:24--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1504483583_97bb82bbaaf46a2902e1ecf4986c0114
Connecting to download.oracle.com (download.oracle.com)|113.171.234.40|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-09-04 07:04:26 ERROR 404: Not Found.

download failed
Oracle JDK 7 is NOT installed.
dpkg: error processing package oracle-java7-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up sgml-data (2.0.10) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu5) ...
Processing triggers for hicolor-icon-theme (0.15-1) ...
Setting up synaptic (0.84.2) ...
Processing triggers for sgml-base (1.29) ...
Setting up docbook-xml (4.5-8) ...
Processing triggers for sgml-base (1.29) ...
Setting up rarian-compat (0.8.1-6) ...
Errors were encountered while processing:
 oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried to install Oracle Java7 JDK, but this failed. And now everything fails.

How can i remove the references to oracle-java7-installer?

  • Does sudo apt purge oracle-java7-installer help? If not, does sudo dpkg --purge oracle-java7-installer help (from this answer). – Chai T. Rex Dec 3 '17 at 15:25
  • @ChaiT.Rex No need to purge something which isn't installed yet :) Its simply the installer gets fired because its script lingers in partial and gets fired every time. But yes purging would do the same job but might cause problems. – Videonauth Dec 3 '17 at 15:28
  • 1
    Possible duplicate of Cant install Oracle Java 8 in Ubuntu 16.04 – karel Jan 17 '18 at 12:23
2

You need to clean your archives, this happens because you tried to install Oracle 7 JDK and now the partial installed package lingers around causing this error to occur every time you install something. To clean your archives you have multiple options, two of them the official way to go and one if the other two fail.

The usual command to use here is:

sudo apt clean

Alternatively the following will do the same:

sudo apt autoclean

If both of the above fail, you can do the following:

sudo rm /var/cache/apt/archives/*\.deb
sudo rm /var/cache/apt/archives/partial/*

This should fix this error occurring every time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.