Results 1 to 9 of 9

Thread: Dpkg input/output error blocking any package operation.

  1. #1
    Join Date
    Feb 2008
    Location
    Earth, or nearby?
    Beans
    175
    Distro
    Ubuntu

    Dpkg input/output error blocking any package operation.

    I've posted the details here, but as getting answers on Ask Ubuntu can take a bit long (and I'd like to get this answered ASAP), I'm also asking for help here.

    http://askubuntu.com/questions/60329.../603305#603305

    I cannot perform any operation: installation, removal or purging. Dpkg returns this error:

    Code:
    dpkg: unrecoverable fatal error, aborting: reading files list for package 'linux-headers-3.16.0-31': Input/output error E: Sub-process /usr/bin/dpkg returned an error code (2) A package failed to install. Trying to recover:
    It isn't, as I thought originally, a bad line in the status file, as removing the entry for linux-headers-3.16.0-31 did not fix the problem. Also clearing the database and cache as suggested did not fix the issue. Now I am getting a slightly different error:

    Code:
    dpkg: unrecoverable fatal error, aborting: E: Sub-process /usr/bin/dpkg returned an error code (2) A package failed to install. Trying to recover:
    I have tried whatever solutions I could find, but nothing works so far. I cannot reinstall as I do not have a drive on which to backup my files. I know this can be fixed, so please, if anyone has any idea, point me in the right direction.

  2. #2
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Dpkg input/output error blocking any package operation.

    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests / username changes by PM, thanks. |
    [SIGPIC][/SIGPIC]

  3. #3
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,520

    Re: Dpkg input/output error blocking any package operation.

    When dealing with dpkg, don't jack around trying random stuff you find on the internet.
    It's usually a waste of time, and sometimes makes fixing harder.

    We need more information.

    Can we please see more context for your error message? Was this a dpkg command you were running? Or something from apt?
    How long have you had this problem?

    What command(s) do you run to reliably reproduce this problem?

    Do you have ANY other applications that have recently had input/output errors or crashes?

    Have you run fsck?

    If you run 'sudo apt-get update', does it work successfully?

  4. #4
    Join Date
    Feb 2008
    Location
    Earth, or nearby?
    Beans
    175
    Distro
    Ubuntu

    Re: Dpkg input/output error blocking any package operation.

    Quote Originally Posted by ian-weisser View Post
    When dealing with dpkg, don't jack around trying random stuff you find on the internet.
    It's usually a waste of time, and sometimes makes fixing harder.

    We need more information.

    Can we please see more context for your error message? Was this a dpkg command you were running? Or something from apt?
    How long have you had this problem?

    What command(s) do you run to reliably reproduce this problem?

    Do you have ANY other applications that have recently had input/output errors or crashes?

    Have you run fsck?

    If you run 'sudo apt-get update', does it work successfully?
    Thanks for your reply and your concern but I assure I was not "randomly jacking around". I'm not a noob, even if I'm not a dpkg expert.

    That said:

    • The problem started about a day or two ago after regular system updates.
    • I was using Synaptic when I first encountered the problem, but any dpkg related command get this result once you get to installing/removal.
    • It can be reproduced with apt-get install/remove anything.
    • I ran fsck about twice - no errors.
    • sudo apt-get update works fine.
    • No other application has been giving I/O errors.
    • SMART data says there are 23 bad sectors (the drive is a bit old, and well used), but no reallocated sectors.
    • The linux-headers-blablaba (see original post) package seems to be the issue. Running a script to copy and backup apt's config and refresh it (I'll post the link later to the script) ran into an issue with the same package's md5 checksum (forgot where it was located and since the script moved so fast I couldn't copy/paste - so I will have to try that again later).
    • dpkg --configure -a gives no errors and no result. Same with apt-get install -f.
    • dpkg -C gives nothing.
    • Reading the database always stops at 40% with this error.
    • The usual fix of removing the malformed line from the status file did not work.


    This is all the extra information I could think of.

  5. #5
    Join Date
    Feb 2008
    Location
    Earth, or nearby?
    Beans
    175
    Distro
    Ubuntu

    Re: Dpkg input/output error blocking any package operation.

    Quote Originally Posted by bapoumba View Post
    Well, would you believe it? I tried this before (twice!) and it didn't work - but now it did!

    Puzzled, but pleased. Thank you!

  6. #6
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,520

    Re: Dpkg input/output error blocking any package operation.

    I'm puzzled too, but happy to see you got it sorted.

  7. #7
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Dpkg input/output error blocking any package operation.

    Quote Originally Posted by ian-weisser View Post
    When dealing with dpkg, don't jack around trying random stuff you find on the internet.
    It's usually a waste of time, and sometimes makes fixing harder.
    ..
    Were you referring to the link I posted ?
    It helped me once. I could not find the page I took it from (that was quite some time ago, when I did not take real notes) but it was from a debian tutorial or bug. I remembered the general process and searched the forums here.

    Glad to see you got it sorted out rolandixor
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests / username changes by PM, thanks. |
    [SIGPIC][/SIGPIC]

  8. #8
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,520

    Re: Dpkg input/output error blocking any package operation.

    Quote Originally Posted by bapoumba View Post
    Were you referring to the link I posted ?
    No! Your links, like the rest of your contributions here, have helped many people.

    The phrase is intended to disparage the rather poor advice often found without adequate context out in the wild,
    NOT to disparage the seekers of advice,
    NOT to disparage the kindly and knowledgable advisors.

    And I heartily apologize to everyone for a phrase that has distracted from the original puzzling dpkg issue.

  9. #9
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Dpkg input/output error blocking any package operation.

    OK thanks and sorry for asking, I just wanted to understand what you were meaning

    That said, I agree this error got me searching left and right a while back. Most probably the drive should be monitored. In my case, at the time, the laptop was not dying, It is now barely breathing, dead battery for a long time and recent random shutdowns. At the time, if I recall correctly, I was not running low on space and I had tried to restore the .list file from backup without editing.

    @rolandixor : have you had crashes, power interruption or dpkg (or package manager) interruptions before this error appeared ? Or manually removed some files ?
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests / username changes by PM, thanks. |
    [SIGPIC][/SIGPIC]

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •