Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question
    
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 Apr 2 '12 at 20:14

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
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 Apr 2 '12 at 20:52
    
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 Apr 2 '12 at 21:04
    
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 Apr 2 '12 at 21:35
1  
See edit to original answer. –  ELO Apr 3 '12 at 5:45
    
Just got in, I'm going to try that and will get back to you. Thanks again! –  NateDSaint Apr 3 '12 at 13:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.