Wrong libc6 version in Debian Squeeze -- can I go back?

1

4

Attempting to make some ruby gems work, I discovered I needed to install the dev ruby package, which apparently required the dev libc6. When I tried to install it (using the approved squeeze apt-sources), I discovered the latest libc6-dev was out of sync with my current version of libc.
It turns out the version of libc6 I should be using (according to apt) should be libc6 2.11.3-2. I am instead on libc6 2.13-7. At some point a user must have used an upstream source to do something and it grabbed a new libc6.

My question is this: if I want to get back in line with the approved versions for my OS, will I need to uninstall libc6 and all its dependent programs and then reinstall them via apt-get, or is there a better way to do this?

I've also discovered that the latest libc6-dev is uncompatible with the current version of gcc I have (4.4), so going forward isn't an option unless I do that too.

EDIT: The solution we ended up using was to use aptitude to download the .deb files, and then use dpkg to install them.

For example, navigate to /var/cache/apt/archives (just to keep them in the same place apt-get puts them)

execute the following:

aptitude download libc6 -t squeeze
dpkg --force-depends -i <name of package>.deb

This resolved that issue, but obviously it caused another set of dependency issues. Each one can be resolved in the same way.

aptitude download libc-bin -t squeeze
dpkg --force-depends -i <name of package>.deb

NateDSaint

Posted 2012-04-02T18:39:22.800

Reputation: 127

Just a note, in my version of apt, -t stable had no effect. You needed to do "aptitude download lib6/stable" instead. – Jeremy Salwen – 2015-02-04T15:08:59.397

just attempted uninstalling glibc and it was not handled gracefully by apt, had to restore from clone. May just have to wait until wheezy is stable and get everything back on the same level, or potentially just upstream the compilers for now and hope for the best. – NateDSaint – 2012-04-02T20:14:48.757

Answers

2

As per Debian package repository, Squeeze does use 2.11.3-2 version of libc6.So if you've got newer version installed, you're probably tracking Wheezy, Sid, some other unofficial repository or have installed libc6 manually. Check your /etc/apt/sources.list and /etc/apt/sources.list.d/*

Either way, you can install desired version using Synaptic Package Manager. Open it, locate the package, select Package -> Force Version from the menu. There you can choose from versions available in your configured sources.

Edit:

APT does have console command for this, apt-get install <package>=<version> Besides that, you can also specify Debian release you want to use (has to do with automatic pinning), provided it is in your sources, with apt-get -t squeeze install <package> (or stable instead of squeeze) and you can use =<version> here too. Execute all commands as root. After reverting back from in this case experimental to stable, dependencies may cause a mess, so you might have to manually downgrade packages that libc6 depends on too, and possibly its dependants.

You can also do everything manually without dependency check (not recommended if you're not really sure what to do in case something breaks) by first downloading package with apt-get download libc6, then go to /var/cache/apt/archives/ where APT stores downloaded packages and issue dpkg --force-downgrade -i <full_package_name>.deb as root. When entering downloaded package name, type libc6 then use TAB autocompletion to make it easier.

ELO

Posted 2012-04-02T18:39:22.800

Reputation: 146

The current sources.list is using only the accepted squeeze versions. Looking at previous versions of the file in rsync, it looks like some completely different experimental sources were being used. Using synaptic, can I actually go back a version, though? It seems like I can only force new versions. – NateDSaint – 2012-04-02T20:52:03.520

You should be able to go back a version, just make sure to remove unneeded sources from a list (both sources.list and files in sources.list.d/). And check if pinning is in operation as it may cause override problems too.

– ELO – 2012-04-02T21:04:48.560

Sounds interesting. This is on a server, but it's a VM so I have access to the console. I was hoping apt-get had something like this but the only option seems to be to do a remove and then install, but that kills everything that libc6 uses and puts me in an unrecoverable state. Thanks for the tip, I'll come back when I've given it a full shot. – NateDSaint – 2012-04-02T21:35:21.987

1See edit to original answer. – ELO – 2012-04-03T05:45:53.877

Just got in, I'm going to try that and will get back to you. Thanks again! – NateDSaint – 2012-04-03T13:12:13.820

Here's the wall I'm hitting with apt: if I do apt-get libc6=2.11.3-2 it tells me I need the older libc-bin (libc6-i686). If I try to get it, it tells me it pre-depends on the earlier libc6. Trying to do both in one go is also a fail, says both messages. I'm guessing I have no choice but to force a downgrade with dpkg and go from there? – NateDSaint – 2012-04-03T13:26:57.810

Why don't you try the other mentioned command apt-get -t for both packages? Then if that doesn't work try aptitude -t squeeze install libc6 libc-bin and if all fail you can always play with dpkg. – ELO – 2012-04-03T14:37:22.477

let us continue this discussion in chat

– NateDSaint – 2012-04-03T14:43:04.943

I've opened this open in chat, feel free to answer there, but you've already helped me a great deal. It looks like all the "expected" solutions are not working, my debian install appears to be fully hosed. I may have no choice but to start with a fresh VM if I want to resolve this, but thanks for your help! – NateDSaint – 2012-04-03T15:54:14.303

1

sorting sources.list --> downloading package and doing force downgrade worked for me! after that all I had to do was

apt-get -f install 

&&

apt-get autoremove

   

bili4mb

Posted 2012-04-02T18:39:22.800

Reputation: 11