Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been running Ubuntu 12.04 for the past few weeks. I recently tried to download and install some files through the Update Manager. It located a few files, downloaded them, but then failed to install them. It gave the error:

installArchives() failed: (Reading database ... 
(Reading database ... 80%
dpkg: unrecoverable fatal error, aborting:
 reading files list for package 'libasn1-8-heimdal': Input/output error

I tried using apt-get upgrade but a similar error was produced:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  icedtea-6-jre-cacao icedtea-6-jre-jamvm openjdk-6-jre openjdk-6-jre-headless
5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/34.6 MB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 80%
dpkg: unrecoverable fatal error, aborting:
 reading files list for package 'libasn1-8-heimdal': Input/output error
E: Sub-process /usr/bin/dpkg returned an error code (2)

Any help would be greatly appreciated. Thanks in advance.

Edit: Here's some extra information that may be useful. My original problem was that the Ubuntu Software Centre would not open. I found that the Update Manager and Synaptic Package Manager also failed to open. They all gave an error along the lines of:

"installArchives() failed: dpkg: error: reading package info file '/var/lib/dpkg/available': Input/output errorError in function:"

After much googling I seemed to fix that problem as the package managers would open again. When I then tried to download and install any updates from the Update Manager I got the error at the beginning of this post.

share|improve this question
What files have you downloaded? From where? What does the update manager has to do with it? – mikewhatever May 19 '12 at 14:43
You might try to uninstal (and later reinstall)l the package in the message. If that fails you might try to clear out the cache. – John S Gruber May 19 '12 at 18:06
I am still working on fixing this, I just haven't had the chance yet. I am going to try instructions given here: when I have the chance. – user64654 May 21 '12 at 12:36
Why did you choose to install 12.04 and not 14.04? After all, you said you got it a couple of weeks ago, and Trusty has been out for like nine months. – FuzzyToothpaste Jan 2 '15 at 18:04
up vote 9 down vote accepted

I have fixed the problem with these instructions.

So the solution is the following:

  1. Go into the /var/lib/dpkg directory
  2. Make a backup of the status file
  3. Edit the status file
  4. Search the package that gave the error
  5. Just delete the lines from this package (but let all other lines that concern other packages even if they contains the broken package in their "Replaces" or "Depends" fields)


  6. Save changes in the status file

  7. Run: sudo dpkg --configure -a
  8. Force the re-installation of missing dependencies (because now, there are some):

    sudo apt-get -f install

    I think that if the broken package does not depend on any other package (could be rare), just reinstall it:

    sudo apt-get install the_package
  9. Everything is fine now can update, upgrade, or install new packages!

It should be noted that I had a few differences to the solution given there. The status file was not easy to edit (as it is an important file and never meant to be edited). Any edits made there should be done with care, and the file should be backed up before you make any changes.

I had to repeat steps 4-8 three times (each time the error would be the same just with a different package). Finally when all the packages were removed, I was able to reinstall them, and it fixed my problem.

share|improve this answer

It can happen that the disk is corrupted with inodes.

With a live CD, run this command

sudo fdisk -l

note the disk and partition, it could be /dev/dsb1 then repair it:

sudo fsck -y /dev/sdb1

Reboot, and return on the system

sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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