error when updating/installing

Asked by Ellen Goldstein

Whenever I try to update (using the Update Manager or the Terminal), the process fails and I get the following error message:

installArchives() failed:
Extracting templates from packages: 93%
Extracting templates from packages: 100%

Preconfiguring packages ...

Extracting templates from packages: 93%
Extracting templates from packages: 100%

Preconfiguring packages ...

(Reading database ...

dpkg: warning: files list file for package `linux-headers-2.6.35-22-generic' missing, assuming package has no files currently installed.

(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%dpkg: unrecoverable fatal error, aborting:

 failed to read on buffer copy for files list for package `linux-headers-2.6.35-25-generic': Input/output error

I've tried a variety of solutions so far and have fun a file system check, which never finds any errors. I've tried reinstalling the package that seems to be causing the error (linux-headers-2.6.35-25-generic), but I get the same error message:

ellen@ellen-laptop:~$ sudo apt-get --reinstall install linux-headers-2.6.35-25-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 32 not upgraded.
Need to get 807kB of archives.
After this operation, 0B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ maverick-updates/main linux-headers-2.6.35-25-generic amd64 2.6.35-25.44 [807kB]
Fetched 807kB in 1s (473kB/s)
Selecting previously deselected package linux-headers-2.6.35-25-generic.
(Reading database ...
dpkg: warning: files list file for package `linux-headers-2.6.35-22-generic' missing, assuming package has no files currently installed.
(Reading database ... 55%dpkg: unrecoverable fatal error, aborting:
 failed to read on buffer copy for files list for package `linux-headers-2.6.35-25-generic': Input/output error
E: Sub-process /usr/bin/dpkg returned an error code (2)

Here is the output from the Package Manager Troubleshooting instructions.

ellen@ellen-laptop:~$ sudo fuser -vvv /var/lib/dpkg/lock
ellen@ellen-laptop:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
DISTRIB_DESCRIPTION="Ubuntu 10.10"
ellen@ellen-laptop:~$ uname -a
Linux ellen-laptop 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 18:42:20 UTC 2011 x86_64 GNU/Linux
ellen@ellen-laptop:~$ sudo rm /var/lib/apt/lists/lock
ellen@ellen-laptop:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
cp: reading `/var/lib/dpkg/info/linux-headers-2.6.35-22.md5sums': Input/output error
cp: reading `/var/lib/dpkg/info/linux-headers-2.6.35-25-generic.list': Input/output error
cp: reading `/var/lib/dpkg/info/linux-headers-2.6.35-25.md5sums': Input/output error
ellen@ellen-laptop:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
ellen@ellen-laptop:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
ellen@ellen-laptop:~$ sudo rm -rf /var/lib/dpkg/updates/*
ellen@ellen-laptop:~$ sudo rm -rf /var/lib/apt/lists
ellen@ellen-laptop:~$ sudo rm /var/cache/apt/*.bin
ellen@ellen-laptop:~$ sudo mkdir /var/lib/apt/lists
ellen@ellen-laptop:~$ sudo mkdir /var/lib/apt/lists/partial
ellen@ellen-laptop:~$ LANG=C;sudo apt-get clean
ellen@ellen-laptop:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
ellen@ellen-laptop:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ellen@ellen-laptop:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824
Get:1 http://dl.google.com stable Release.gpg [198B]
Ign http://dl.google.com/linux/talkplugin/deb/ stable/main Translation-en
Get:2 http://dl.google.com stable Release [1347B]
Get:3 http://extras.ubuntu.com maverick Release.gpg [72B]
Ign http://extras.ubuntu.com/ubuntu/ maverick/main Translation-en
Get:4 http://archive.canonical.com maverick Release.gpg [198B]
Ign http://archive.canonical.com/ubuntu/ maverick/partner Translation-en
Get:5 http://archive.ubuntu.com maverick Release.gpg [198B]
Ign http://archive.ubuntu.com/ubuntu/ maverick/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick/multiverse Translation-en
Get:6 http://dl.google.com stable/main amd64 Packages [757B]
Get:7 http://archive.canonical.com maverick Release.gpg [198B]
Ign http://archive.canonical.com/ maverick/partner Translation-en
Get:8 http://extras.ubuntu.com maverick Release [9762B]
Get:9 http://archive.canonical.com maverick Release [5925B]
Ign http://archive.ubuntu.com/ubuntu/ maverick/restricted Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick/universe Translation-en
Get:10 http://archive.ubuntu.com maverick-updates Release.gpg [198B]
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/multiverse Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/restricted Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/universe Translation-en
Get:11 http://archive.ubuntu.com maverick-security Release.gpg [198B]
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/multiverse Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/restricted Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/universe Translation-en
Get:12 http://archive.ubuntu.com maverick Release [39.8kB]
Get:13 http://archive.canonical.com maverick Release [5925B]
Get:14 http://extras.ubuntu.com maverick/main amd64 Packages [1201B]
Get:15 http://archive.canonical.com maverick/partner Sources [3979B]
Get:16 http://archive.canonical.com maverick/partner amd64 Packages [6673B]
Get:17 http://archive.ubuntu.com maverick-updates Release [31.4kB]
Get:18 http://archive.canonical.com maverick/partner amd64 Packages [6673B]
Get:19 http://archive.ubuntu.com maverick-security Release [31.4kB]
Get:20 http://archive.ubuntu.com maverick/main amd64 Packages [1491kB]
Get:21 http://archive.ubuntu.com maverick/restricted amd64 Packages [6002B]
Get:22 http://archive.ubuntu.com maverick/universe amd64 Packages [5771kB]
Get:23 http://archive.ubuntu.com maverick/multiverse amd64 Packages [180kB]
Get:24 http://archive.ubuntu.com maverick-updates/main amd64 Packages [368kB]
Get:25 http://archive.ubuntu.com maverick-updates/restricted amd64 Packages [1802B]
Get:26 http://archive.ubuntu.com maverick-updates/universe amd64 Packages [143kB]
Get:27 http://archive.ubuntu.com maverick-updates/multiverse amd64 Packages [5065B]
Get:28 http://archive.ubuntu.com maverick-security/main amd64 Packages [148kB]
Get:29 http://archive.ubuntu.com maverick-security/restricted amd64 Packages [14B]
Get:30 http://archive.ubuntu.com maverick-security/universe amd64 Packages [70.5kB]
Get:31 http://archive.ubuntu.com maverick-security/multiverse amd64 Packages [3624B]
Fetched 8336kB in 11s (704kB/s)
Reading package lists... Done
W: Duplicate sources.list entry http://archive.canonical.com/ubuntu/ maverick/partner amd64 Packages (/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_maverick_partner_binary-amd64_Packages)
W: You may want to run apt-get update to correct these problems
ellen@ellen-laptop:~$ sudo dpkg --clear-avail
ellen@ellen-laptop:~$ sudo dpkg --configure -a
ellen@ellen-laptop:~$ LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
ellen@ellen-laptop:~$ LANG=C;sudo apt-get --fix-missing install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
ellen@ellen-laptop:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824 && sudo apt-get dist-upgrade
Get:1 http://dl.google.com stable Release.gpg [198B]
Ign http://dl.google.com/linux/talkplugin/deb/ stable/main Translation-en
Get:2 http://dl.google.com stable Release [1347B]
Get:3 http://dl.google.com stable/main amd64 Packages [757B]
Hit http://archive.canonical.com maverick Release.gpg
Ign http://archive.canonical.com/ubuntu/ maverick/partner Translation-en
Hit http://archive.canonical.com maverick Release.gpg
Hit http://extras.ubuntu.com maverick Release.gpg
Ign http://extras.ubuntu.com/ubuntu/ maverick/main Translation-en
Hit http://archive.ubuntu.com maverick Release.gpg
Ign http://archive.ubuntu.com/ubuntu/ maverick/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick/multiverse Translation-en
Ign http://archive.canonical.com/ maverick/partner Translation-en
Hit http://archive.canonical.com maverick Release
Hit http://extras.ubuntu.com maverick Release
Ign http://archive.ubuntu.com/ubuntu/ maverick/restricted Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick/universe Translation-en
Hit http://archive.ubuntu.com maverick-updates Release.gpg
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/multiverse Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/restricted Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/universe Translation-en
Hit http://archive.ubuntu.com maverick-security Release.gpg
Hit http://archive.canonical.com maverick Release
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/multiverse Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/restricted Translation-en
Hit http://extras.ubuntu.com maverick/main amd64 Packages
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/universe Translation-en
Hit http://archive.ubuntu.com maverick Release
Hit http://archive.ubuntu.com maverick-updates Release
Hit http://archive.canonical.com maverick/partner Sources
Hit http://archive.canonical.com maverick/partner amd64 Packages
Hit http://archive.ubuntu.com maverick-security Release
Hit http://archive.canonical.com maverick/partner amd64 Packages
Hit http://archive.ubuntu.com maverick/main amd64 Packages
Hit http://archive.ubuntu.com maverick/restricted amd64 Packages
Hit http://archive.ubuntu.com maverick/universe amd64 Packages
Hit http://archive.ubuntu.com maverick/multiverse amd64 Packages
Hit http://archive.ubuntu.com maverick-updates/main amd64 Packages
Hit http://archive.ubuntu.com maverick-updates/restricted amd64 Packages
Hit http://archive.ubuntu.com maverick-updates/universe amd64 Packages
Hit http://archive.ubuntu.com maverick-updates/multiverse amd64 Packages
Hit http://archive.ubuntu.com maverick-security/main amd64 Packages
Hit http://archive.ubuntu.com maverick-security/restricted amd64 Packages
Hit http://archive.ubuntu.com maverick-security/universe amd64 Packages
Hit http://archive.ubuntu.com maverick-security/multiverse amd64 Packages
Fetched 2302B in 0s (3270B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  apturl apturl-common bind9-host dnsutils flashplugin-installer gimp
  gimp-data gnome-nettool gnome-user-guide google-talkplugin libbind9-60
  libdns66 libgimp2.0 libisc60 libisccc60 libisccfg60 liblwres60 libmodplug1
  libpam-modules libpam-runtime libpam0g libsyncdaemon-1.0-1 libxml2
  libxml2-utils python-apt python-libxml2 python-ubuntuone-client rdesktop
  ubuntu-sso-client ubuntuone-client ubuntuone-client-gnome xdg-utils
32 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 21.3MB of archives.
After this operation, 319kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://dl.google.com/linux/talkplugin/deb/ stable/main google-talkplugin amd64 2.1.6.0-1 [7726kB]
Get:2 http://archive.ubuntu.com/ubuntu/ maverick-updates/main libpam-modules amd64 1.1.1-4ubuntu2.3 [350kB]
Get:3 http://archive.ubuntu.com/ubuntu/ maverick-updates/main ubuntu-sso-client all 1.0.9-0ubuntu1 [29.5kB]
Get:4 http://archive.ubuntu.com/ubuntu/ maverick-updates/main libpam-runtime all 1.1.1-4ubuntu2.3 [85.8kB]
Get:5 http://archive.ubuntu.com/ubuntu/ maverick-updates/main libpam0g amd64 1.1.1-4ubuntu2.3 [95.1kB]
Get:6 http://archive.ubuntu.com/ubuntu/ maverick-security/main libxml2 amd64 2.7.7.dfsg-4ubuntu0.2 [869kB]
Get:7 http://archive.ubuntu.com/ubuntu/ maverick-updates/main bind9-host amd64 1:9.7.1.dfsg.P2-2ubuntu0.3 [69.8kB]
Get:8 http://archive.ubuntu.com/ubuntu/ maverick-updates/main dnsutils amd64 1:9.7.1.dfsg.P2-2ubuntu0.3 [161kB]
Get:9 http://archive.ubuntu.com/ubuntu/ maverick-updates/main libisc60 amd64 1:9.7.1.dfsg.P2-2ubuntu0.3 [170kB]
Get:10 http://archive.ubuntu.com/ubuntu/ maverick-updates/main libdns66 amd64 1:9.7.1.dfsg.P2-2ubuntu0.3 [696kB]
Get:11 http://archive.ubuntu.com/ubuntu/ maverick-updates/main libisccc60 amd64 1:9.7.1.dfsg.P2-2ubuntu0.3 [31.5kB]
Get:12 http://archive.ubuntu.com/ubuntu/ maverick-updates/main libisccfg60 amd64 1:9.7.1.dfsg.P2-2ubuntu0.3 [54.7kB]
Get:13 http://archive.ubuntu.com/ubuntu/ maverick-updates/main liblwres60 amd64 1:9.7.1.dfsg.P2-2ubuntu0.3 [50.1kB]
Get:14 http://archive.ubuntu.com/ubuntu/ maverick-updates/main libbind9-60 amd64 1:9.7.1.dfsg.P2-2ubuntu0.3 [37.1kB]
Get:15 http://archive.ubuntu.com/ubuntu/ maverick-updates/main python-apt amd64 0.7.96.1ubuntu11.2 [207kB]
Get:16 http://archive.ubuntu.com/ubuntu/ maverick-updates/main apturl amd64 0.4.1ubuntu7.1 [13.6kB]
Get:17 http://archive.ubuntu.com/ubuntu/ maverick-updates/main apturl-common amd64 0.4.1ubuntu7.1 [16.1kB]
Get:18 http://archive.ubuntu.com/ubuntu/ maverick-updates/multiverse flashplugin-installer amd64 10.3.181.26ubuntu0.10.10.1 [20.4kB]
Get:19 http://archive.ubuntu.com/ubuntu/ maverick-updates/main libgimp2.0 amd64 2.6.10-1ubuntu3.3 [636kB]
Get:20 http://archive.ubuntu.com/ubuntu/ maverick-updates/main gimp-data all 2.6.10-1ubuntu3.3 [1989kB]
Get:21 http://archive.ubuntu.com/ubuntu/ maverick-updates/main gimp amd64 2.6.10-1ubuntu3.3 [4807kB]
Get:22 http://archive.ubuntu.com/ubuntu/ maverick-updates/main gnome-nettool amd64 2.31.6-0ubuntu1.1 [114kB]
Get:23 http://archive.ubuntu.com/ubuntu/ maverick-updates/main gnome-user-guide all 2.30.0+git20100403ubuntu3.1 [1942kB]
Get:24 http://archive.ubuntu.com/ubuntu/ maverick-updates/main libmodplug1 amd64 1:0.8.8.1-1ubuntu1.2 [178kB]
Get:25 http://archive.ubuntu.com/ubuntu/ maverick-updates/main ubuntuone-client-gnome amd64 1.4.6-0ubuntu3 [130kB]
Get:26 http://archive.ubuntu.com/ubuntu/ maverick-updates/main xdg-utils all 1.0.2+cvs20100307-1ubuntu0.3 [62.5kB]
Get:27 http://archive.ubuntu.com/ubuntu/ maverick-updates/main libsyncdaemon-1.0-1 amd64 1.4.6-0ubuntu3 [52.5kB]
Get:28 http://archive.ubuntu.com/ubuntu/ maverick-updates/main ubuntuone-client all 1.4.6-0ubuntu3 [25.5kB]
Get:29 http://archive.ubuntu.com/ubuntu/ maverick-updates/main python-ubuntuone-client all 1.4.6-0ubuntu3 [158kB]
Get:30 http://archive.ubuntu.com/ubuntu/ maverick-security/main libxml2-utils amd64 2.7.7.dfsg-4ubuntu0.2 [93.0kB]
Get:31 http://archive.ubuntu.com/ubuntu/ maverick-security/main python-libxml2 amd64 2.7.7.dfsg-4ubuntu0.2 [236kB]
Get:32 http://archive.ubuntu.com/ubuntu/ maverick-updates/main rdesktop amd64 1.6.0-3ubuntu2.1 [153kB]
Fetched 21.3MB in 18s (1155kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ...
dpkg: warning: files list file for package `linux-headers-2.6.35-22-generic' missing, assuming package has no files currently installed.
(Reading database ... 55%dpkg: unrecoverable fatal error, aborting:
 failed to read on buffer copy for files list for package `linux-headers-2.6.35-25-generic': Input/output error
E: Sub-process /usr/bin/dpkg returned an error code (2)
ellen@ellen-laptop:~$

Any help or suggestions are appreciated. Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Best Manfred Hampl (m-hampl) said :
#1

Apparently some of the files on your system are broken. To resolve try the following:

sudo rm /var/lib/dpkg/info/linux-headers-2.6.35-22.md5sums
sudo rm /var/lib/dpkg/info/linux-headers-2.6.35-25-generic.list
sudo rm /var/lib/dpkg/info/linux-headers-2.6.35-25.md5sums
sudo apt-get install --reinstall linux-headers-2.6.35-22
sudo apt-get install --reinstall linux-headers-2.6.35-25
sudo apt-get install --reinstall linux-headers-2.6.35-25-generic
sudo apt-get -f install

Revision history for this message
Ellen Goldstein (ellenjulia) said :
#2

Wow. Everything is back to normal. Thanks so much!