error upgrading libc6 - non-dpkg libc6-i686 conflict

Hi all,

While trying to do some routine package upgrades to my debian lenny machine, apt tried to upgrade libc6 to 2.7-6 and failed as follows:

# apt-get install libc6

Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
locales glibc-doc libc6-i686
The following NEW packages will be installed:
libc6
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0B/4487kB of archives.
After unpacking 10.9MB of additional disk space will be used.
y
E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: Bad file descriptor(Reading database ... 17 files and directories currently installed.)
Unpacking libc6 (from .../archives/libc6_2.7-6_i386.deb) ...

A non-dpkg owned copy of the libc6-i686 package was found.
It is not safe to upgrade the C library in this situation;
please remove that copy of the C library and try again.
dpkg: error processing /var/cache/apt/archives/libc6_2.7-6_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.7-6_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have tried the following:

1 - apt-get -f install - similar result
2 - apt-get update then upgrade - similar results
3 - apt-get install debconf - fails as it depends on libc6. - Catch 22.
4 - removing all instances of libc6-i686 from the system. - no dice

Any Ideas? This looks similar to some recent debian bug reports (Bug#441975) , but those are supposedly resolved. The only discussion of my particular problem seems to be in French, which doesn't help too much.

Thanks in advance.
crud

No votes yet

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

error upgrading libc6 -

You can try:
apt-get install --force-yes libc6

Another thing is:

cd /var/cache/apt/archives
dpkg -i --force-all blahblah.deb (name of the libc6 package)

If that doesn't work:

1. Pop in a live CD like Ubuntu/Kubuntu or whatever you like
2. mount your root partition and delete libc6 and all symlinks to it
3. manually unpack the libc6*.deb file (from var/cache/apt/archives of your root directory) into a temporary directory. Use 'ar' to unpack:
ar x blahblah.deb
Then 'tar -zxvf' to unpack any .tar.gz files.
4. Read the pre/post-remove and the pre-install scripts to see how to prepare to install libc6 (just in case there's something special)
5. Manually copy libc6 where it belongs
6. Read the post-install files to see if anything special needs to be done after installing.
7. Reboot and hope it works; if it boots fine etc, you may be able to force a reinstall of libc6 just so the apt-get system is no longer confused about what's installed.

The first two didn't work.

The first two didn't work. I'll give the live cd option a whirl. Thanks.

got it (i think)

The pre-install script has the following section.

Quote:

if [ -e /lib/tls/i686/cmov/libc.so.6 ] || [ -e /lib/i686/cmov/libc.so.6 ] ; then
status_i686=$(dpkg -s libc6-i686 2>/dev/null | grep ^Status: | sed -e 's/^Status: \(.*\) \(.*\) \(.*\)/\3/g')
status_xen=$(dpkg -s libc6-xen 2>/dev/null | grep ^Status: | sed -e 's/^Status: \(.*\) \(.*\) \(.*\)/\3/g')
if ([ -z "$status_i686" ] || [ "$status_i686" = "not-installed" ] || [ "$status_i686" = "config-files" ]) && \
([ -z "$status_xen" ] || [ "$status_xen" = "not-installed" ] || [ "$status_xen" = "config-files" ]); then
echo
echo "A non-dpkg owned copy of the libc6-i686 package was found."
echo "It is not safe to upgrade the C library in this situation;"
echo "please remove that copy of the C library and try again."
exit 1
fi
fi

I temporarily renamed /lib/i686/cmov/libc.so.6 to blah.old and used apt to upgrade libc6. I then did an:

Quote:

apt-get update
apt-get update
apt-get -f install

dpkg installed a fresh copy. Kind of a kluge, but everything seems to work ok. Thanks for getting me on the right track.

Syndicate content