[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: big problem with libc6 install



On Mon, Jan 20, 2003 at 06:35:43PM -0000, Alberto  Rodriguez wrote:
> I have a host with debian woody. It was a few time that I didn´t upgrade the packets. with apt-get I tried upgrade packets but this failed.
> Now if I run "dpkg -C" I get:
> 
> 
>  Package: libc6
> Status: install reinstreq half-installed
> Priority: required
> Section: base
> Installed-Size: 12760
> Maintainer: Ben Collins <bcollins@debian.org>
> Source: glibc
> Version: 2.2.5-11.1
> Config-Version: 2.2.5-11.1
> 
> If I try apt-get install libc6, I get:
> E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
> 
> 
> I try so dpkg --configure -a, and I get:
> dpkg: dependency problems prevent configuration of libc6-dev:
>  libc6-dev depends on libc6 (= 2.2.5-11.2); however:
>   Package libc6 is not installed.
> dpkg: error processing libc6-dev (--configure):
>  dependency problems - leaving unconfigured
> Errors were encountered while processing:
>  libc6-dev
> 
> 
> If I enter in /var and run find -iname "*libc6*", I get the following:
> ./cache/apt/archives/libc6_2.1.3-20_i386.deb
> ./cache/apt/archives/libc6-dev_2.1.3-20_i386.deb
> ./cache/apt/archives/libc6_2.2.5-10_i386.deb
> ./cache/apt/archives/libc6-dev_2.2.5-10_i386.deb
> ./cache/apt/archives/libc6_2.2.5-11.1_i386.deb
> ./cache/apt/archives/libc6-dev_2.2.5-11.1_i386.deb
> ./cache/apt/archives/libc6-dev_2.2.5-11.2_i386.deb
> ./cache/apt/archives/libc6_2.2.5-11.2_i386.deb
> ./lib/dpkg/info/libc6.preinst
> ./lib/dpkg/info/libc6.list
> ./lib/dpkg/info/libc6.prerm
> ./lib/dpkg/info/libc6.postinst
> ./lib/dpkg/info/libc6.postrm
> ./lib/dpkg/info/libc6.shlibs
> ./lib/dpkg/info/libc6.conffiles
> ./lib/dpkg/info/libc6-dev.postinst
> ./lib/dpkg/info/libc6-dev.list
> ./lib/dpkg/info/libc6-dev.preinst
> ./lib/dpkg/info/libc6-dev.prerm
> 
> According this I have serveral binaries of libc6.
> 
> If I try install with dpkg, dpkg -i ./cache/apt/archives/libc6_2.2.5-11, I get:
> 
> (Reading database ... 17433 files and directories currently installed.)
> Preparing to replace libc6 2.2.5-11.1 (using .../libc6_2.2.5-11.1_i386.deb) ...
> Unpacking replacement libc6 ...
> 
> With the session hang.
> 
> If I open another one (session) and run ps waux | grep dpkg, you can see:
> root       381  1.4  5.3 14604 13764 pts/0   D    16:57   0:03 dpkg -i ./cache/apt/archives/libc6_2.2.5-11.1_i386.deb
> root       395  0.0  0.1  1356  440 pts/0    S    16:57   0:00 dpkg-deb --fsys-tarfile ./cache/apt/archives/libc6_2.2.5-11.1_i386.deb
> root       396  0.0  0.1  1392  504 pts/0    S    16:57   0:00 dpkg-deb --fsys-tarfile ./cache/apt/archives/libc6_2.2.5-11.1_i386.deb
> root       397  0.3  0.2  1428  560 pts/0    S    16:57   0:00 dpkg-deb --fsys-tarfile ./cache/apt/archives/libc6_2.2.5-11.1_i386.deb
> root       407  0.0  0.1  1332  432 pts/1    S    17:01   0:00 grep dpkg
> 
> You can see that dpkg has an "uninterruptible sleep" and of corse if I try kill -9 to pid of dpkg, it doesn´t die. The one way to kill it is rebooting the machine.
> 
> Could anyone help me with this problem?

Ooooh, ouchy.  That's quite a mess :)  You could play around the
LD_LIBRARY_PATH and such with dpkg, but I think there's an easier way.

A .deb is just an 'ar' archive with three files in it: control.tar.gz,
data.tar.gz and debian-binary.  The data.tar.gz file is just a tarball
of the files that deb installs, the other two contain information for
dpkg to maintain it's package database.  I *think* that the easy way out
here is to extract the files from the libc deb (using 'ar x
./cache/apt/archives/libc6_2.2.5-11.1_i386.deb' in an empty directory
somewhere), then untar data.tar.gz in /.  This will put the correct
version of libc back on your system, so hopefully dpkg will work again.

If even tar doesn't work correctly, you might need to install the
statically linked busybox tool set, which, I think, is in woody.

Once dpkg works, just reinstall the exact same deb with dpkg -i and
it'll fix up it's db to match what you just installed.

-rob

PS that was an exceptionally good problem description; most people just
write and say 'dpkg is broken, how do I fix it?', without even trying
anything themselves, or look into the issue at all.

Attachment: pgpw0R5TfRK2N.pgp
Description: PGP signature


Reply to: