E: Sub-process /usr/bin/dpkg returned an error code (1)

I recently ran into the following error in Ubuntu (v 13.10).

E: Sub-process /usr/bin/dpkg returned an error code (1)

Due to this error i was not able to run the update. Here is the fix to this error.

First run:

$ sudo apt-get remove install-info

Then run this command to clear apt archives:

$ sudo apt-get clean

Then finally run

$ sudo apt-get update
$ sudo apt-get upgrade

18 thoughts on “E: Sub-process /usr/bin/dpkg returned an error code (1)”

  1. i had downloaded 1 GB worth data but using
    $ sudo apt-get clean
    made me lose. Third time. Never use clean option .

    Use autoremove.

    Like

  2. Building dependency tree
    Reading state information… Done
    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.
    Setting up firefox (51.0~b6+build1-0ubuntu0.12.04.1) …
    update-alternatives: error: cannot scan directory `/var/lib/dpkg/alternatives’: No such file or directory
    dpkg: error processing firefox (–configure):
    subprocess installed post-installation script returned error exit status 2
    No apport report written because MaxReports is reached already
    Errors were encountered while processing:
    firefox
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    Like

  3. Building dependency tree
    Reading state information… Done
    Calculating upgrade… Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    2 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-java8-installer (8u151-1~webupd8~0) …
    Using wget settings from /var/cache/oracle-jdk8-installer/wgetrc
    Downloading Oracle Java 8…
    –2018-01-22 14:26:48– http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz
    Resolving download.oracle.com (download.oracle.com)… 104.74.82.136
    Connecting to download.oracle.com (download.oracle.com)|104.74.82.136|:80… connected.
    HTTP request sent, awaiting response… 302 Moved Temporarily
    Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz [following]
    –2018-01-22 14:26:49– https://edelivery.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz
    Resolving edelivery.oracle.com (edelivery.oracle.com)… 104.74.119.171, 2a02:26f0:64:482::2d3e, 2a02:26f0:64:4ae::2d3e
    Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.74.119.171|:443… connected.
    HTTP request sent, awaiting response… 302 Moved Temporarily
    Location: http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz?AuthParam=1516611532_04484736f1ae61b70cc37ccc972b3a07 [following]
    –2018-01-22 14:26:51– http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.tar.gz?AuthParam=1516611532_04484736f1ae61b70cc37ccc972b3a07
    Connecting to download.oracle.com (download.oracle.com)|104.74.82.136|:80… connected.
    HTTP request sent, awaiting response… 404 Not Found
    2018-01-22 14:26:51 ERROR 404: Not Found.

    download failed
    Oracle JDK 8 is NOT installed.
    dpkg: error processing package oracle-java8-installer (–configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of intellij-idea-community:
    intellij-idea-community depends on default-jdk | oracle-java7-installer | oracle-java8-installer; however:
    Package default-jdk is not installed.
    Package oracle-java7-installer is not installed.
    Package oracle-java8-installer is not configured yet.

    dpkg: error processing package intellij-idea-community (–configure):
    dependency problems – leaving unconfigured
    No apport report written because the error message indicates its a followup error from a previous failure.
    Errors were encountered while processing:
    oracle-java8-installer
    intellij-idea-community
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    Like

Leave a Reply to mesh Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.