balta
Posts: 3
Joined: Sat Mar 23, 2013 12:25 pm

apt-get upgrade failing [dpkg unrecoverable fatal error]

Sat Apr 06, 2013 4:11 pm

Hi there!
I've been fiddling with a raspberry pi for a few days now.

Code: Select all

pi@raspberrypi ~ $ uname -a
Linux raspberrypi 3.6.11+ #403 PREEMPT Tue Apr 2 22:48:13 BST 2013 armv6l GNU/Linux
Everything seemed to be fine* but now I can't run apt-get upgrade as it crashes.

Code: Select all

pi@raspberrypi ~ $ sudo apt-get update
Hit http://archive.raspberrypi.org wheezy Release.gpg
Hit http://mirrordirector.raspbian.org wheezy Release.gpg
Hit http://archive.raspberrypi.org wheezy Release
Hit http://mirrordirector.raspbian.org wheezy Release
Hit http://archive.raspberrypi.org wheezy/main armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/main armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/contrib armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/non-free armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/rpi armhf Packages
Ign http://archive.raspberrypi.org wheezy/main Translation-en_GB
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
Reading package lists... Done

Code: Select all

pi@raspberrypi ~ $ sudo apt-get upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  libobrender27 libobt0 openbox tzdata
4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/960 kB of archives.
After this operation, 62.5 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
 reading files list for package 'x11-utils': Input/output error
E: Sub-process /usr/bin/dpkg returned an error code (2)

I tried re-installing 'x11-utils' but it fails

Code: Select all

pi@raspberrypi ~ $ sudo apt-get install x11-utils --reinstall
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libblas3gf liblapack3gf
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 4 not upgraded.
Need to get 0 B/215 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: unrecoverable fatal error, aborting:
 reading files list for package 'x11-utils': Input/output error
E: Sub-process /usr/bin/dpkg returned an error code (2)
Please note that the "(Reading database ... " information hangs at 95% for quite some time before proceeding. I'm note sure if that's relevant at all ...

I really have no clue about what to do next. :(
Any help would be very appreciated. Thanks!

*Lately I've been having a lot of SD card corruption issues, like, twice a day. SD used to get corrupted after the second "sudo reboot". Now I only do "sudo shutdown -r now" and updated the firmware with the rpi-update tool. Seems to be working fine.

balta
Posts: 3
Joined: Sat Mar 23, 2013 12:25 pm

Re: apt-get upgrade failing [dpkg unrecoverable fatal error]

Sat Apr 06, 2013 4:19 pm

I don't really know what to say.
:oops:
I was going to include a verbose (-V) output of the apt-get upgrade. But this time it succeeded.
I don't really know why but well, I guess from now on I'll be using the -V flag :D

Code: Select all

pi@raspberrypi ~ $ sudo apt-get upgrade -V
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
   libobrender27 (3.5.0-6 => 3.5.0-7)
   libobt0 (3.5.0-6 => 3.5.0-7)
   openbox (3.5.0-6 => 3.5.0-7)
   tzdata (2013b-1 => 2013b-2)
4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/960 kB of archives.
After this operation, 62.5 kB of additional disk space will be used.
Do you want to continue [Y/n]? yes
Preconfiguring packages ...
(Reading database ... 61079 files and directories currently installed.)
Preparing to replace libobt0 3.5.0-6 (using .../libobt0_3.5.0-7_armhf.deb) ...
Unpacking replacement libobt0 ...
Preparing to replace libobrender27 3.5.0-6 (using .../libobrender27_3.5.0-7_armhf.deb) ...
Unpacking replacement libobrender27 ...
Preparing to replace openbox 3.5.0-6 (using .../openbox_3.5.0-7_armhf.deb) ...
Unpacking replacement openbox ...
Preparing to replace tzdata 2013b-1 (using .../tzdata_2013b-2_all.deb) ...
Unpacking replacement tzdata ...
Processing triggers for desktop-file-utils ...
Processing triggers for man-db ...
Processing triggers for menu ...
Setting up tzdata (2013b-2) ...

Current default time zone: 'Etc/UTC'
Local time is now:      Sat Apr  6 16:08:54 UTC 2013.
Universal Time is now:  Sat Apr  6 16:08:54 UTC 2013.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

Setting up libobt0 (3.5.0-7) ...
Setting up libobrender27 (3.5.0-7) ...
Setting up openbox (3.5.0-7) ...
Processing triggers for menu ...
pi@raspberrypi ~ $
And no, I had rebooted before, in my previous attempts to get it fixed, but the verbose flag was used in the very same shell session as the outputs I posted here ....

As a side (bottom?) note: I'm doing everything via remote desktop using xrdp. Again not sure if it's relevant.

Hope this helps (?) :mrgreen:

Return to “Troubleshooting”