Linux: APT-GET / Repository Error

Created on 27 Sep 2012  ·  5Comments  ·  Source: raspberrypi/linux

Package list repository corrupt after doing apt-get update; apt-get upgrade

Just trashed two SD card installs of Raspbian,

Possibly a problem with
Unpacking replacement libuuid1:armhf ...
during the update,

subsequently all apt-get commands fail as indicated at the bottom of my terminal session below.

pi@raspberrypi ~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
bsdutils libblkid1 libcap2 libmount1 libuuid1 mount python-pygame
python-rpi.gpio python3-rpi.gpio util-linux xserver-common xserver-xorg-core
12 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 7,125 kB of archives.
After this operation, 24.6 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://archive.raspberrypi.org/debian/ wheezy/main python-rpi.gpio armhf 0.4.1a-1 [14.3 kB]
Get:2 http://archive.raspberrypi.org/debian/ wheezy/main python3-rpi.gpio armhf 0.4.1a-1 [12.3 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main mount armhf 2.20.1-5.2 [213 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ wheezy/main util-linux armhf 2.20.1-5.2 [659 kB]
Get:5 http://mirrordirector.raspbian.org/raspbian/ wheezy/main bsdutils armhf 1:2.20.1-5.2 [84.7 kB]
Get:6 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libuuid1 armhf 2.20.1-5.2 [57.7 kB]
Get:7 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libblkid1 armhf 2.20.1-5.2 [119 kB]
Get:8 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libmount1 armhf 2.20.1-5.2 [112 kB]
Get:9 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libcap2 armhf 1:2.22-1.2 [12.5 kB]
Get:10 http://mirrordirector.raspbian.org/raspbian/ wheezy/main python-pygame armhf 1.9.1release+dfsg-7 [2,841 kB]
Get:11 http://mirrordirector.raspbian.org/raspbian/ wheezy/main xserver-common all 2:1.12.3.902-1 [1,395 kB]
Get:12 http://mirrordirector.raspbian.org/raspbian/ wheezy/main xserver-xorg-core armhf 2:1.12.3.902-1 [1,604 kB]
Fetched 7,125 kB in 16s (441 kB/s)
Preconfiguring packages ...
(Reading database ... 58033 files and directories currently installed.)
Preparing to replace mount 2.20.1-5.1 (using .../mount_2.20.1-5.2_armhf.deb) ...
Unpacking replacement mount ...
Processing triggers for man-db ...
Setting up mount (2.20.1-5.2) ...
(Reading database ... 58033 files and directories currently installed.)
Preparing to replace util-linux 2.20.1-5.1 (using .../util-linux_2.20.1-5.2_armhf.deb) ...
Unpacking replacement util-linux ...
Processing triggers for man-db ...
Processing triggers for install-info ...
Processing triggers for mime-support ...
Setting up util-linux (2.20.1-5.2) ...
insserv: warning: current start runlevel(s) (empty) of script hwclock.sh' overwrites defaults (S). insserv: warning: current stop runlevel(s) (S) of scripthwclock.sh' overwrites defaults (0 6).
(Reading database ... 58033 files and directories currently installed.)
Preparing to replace bsdutils 1:2.20.1-5.1 (using .../bsdutils_1%3a2.20.1-5.2_armhf.deb) ...
Unpacking replacement bsdutils ...
Processing triggers for man-db ...
Setting up bsdutils (1:2.20.1-5.2) ...
(Reading database ... 58033 files and directories currently installed.)
Preparing to replace libuuid1:armhf 2.20.1-5.1 (using .../libuuid1_2.20.1-5.2_armhf.deb) ...
Unpacking replacement libuuid1:armhf ...
dpkg: error: --configure needs a valid package name but ':armhf' is not: illegal package name in specifier ':armhf': may not be empty string

Type dpkg --help for help about installing and deinstalling packages [*];
Use dselect' oraptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through less' ormore' !E: Sub-process /usr/bin/dpkg returned an error code (2)
pi@raspberrypi ~ $ sudo apt-get update
Hit http://mirrordirector.raspbian.org wheezy InRelease
Hit http://archive.raspberrypi.org wheezy InRelease
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
Hit http://archive.raspberrypi.org wheezy/main 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... Error!
E: Problem parsing dependency Depends
E: Error occurred while processing libalien-sdl-dev-perl (NewVersion2)
E: Problem with MergeList /var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages
E: The package lists or status file could not be parsed or opened.
pi@raspberrypi ~ $

Most helpful comment

I had this too.

pi@raspberrypi ~ $ sudo rm -rf /var/lib/apt/lists/
pi@raspberrypi ~ $ sudo rm -rf /var/lib/dpkg/status
pi@raspberrypi ~ $ sudo touch /var/lib/dpkg/status

This did the trick for me.

All 5 comments

could you delete all the files in /var/lib/apt/lists/ and retry?

I had this too.

pi@raspberrypi ~ $ sudo rm -rf /var/lib/apt/lists/
pi@raspberrypi ~ $ sudo rm -rf /var/lib/dpkg/status
pi@raspberrypi ~ $ sudo touch /var/lib/dpkg/status

This did the trick for me.

I used the same method as you boxers999 and it worked for me as well.

@spayz
Have you tried the suggestion?
I don't think this is a kernel issue. More likely the repository was in a bad state when you updated, or the apt-get was interrupted/ran out of memory/sdcard spacel.

Closing as not a linux issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dkerr64 picture dkerr64  ·  7Comments

HankB picture HankB  ·  8Comments

wudo94 picture wudo94  ·  5Comments

kucharskim picture kucharskim  ·  7Comments

XECDesign picture XECDesign  ·  6Comments