Why did my upgrade to 12.04 fail with "glibc not found" or "libc6" or "requires kernel 2.6.24" error?

First the explanation, then a solution :)

This happens because your host is almost certainly running OpenVZ on a 2.6.18 kernel (all OpenVZ containers share the host kernel). The reason can range from stability to just plain laziness. The problem is that the libc 2.15 included with Precise requires a minimum 2.6.24 kernel to function. Sometimes this will cause the release-upgrade to fail, but it is possible to complete and get into a partially upgraded neither-here-not-there situation like you have.

Fear not though, the libc requirement is a compile-time option, and it can be set lower (in which case the library includes workarounds for older kernels). I guess setting the minimum to .24 is one way to drag folks into 2012 :)

I've set up a PPA containing a recompiled libc which will work on 2.6.18 or newer (please check uname -r!), and it should override the current libc provided by Precise. Just add ppa:izx/ovz-libc, update, and it should let you get past this. Specifically, something like this:

apt-add-repository ppa:izx/ovz-libc
apt-get update
apt-get -f install
do-release-upgrade

and continue on until the upgrade completes successfully. I highly recommend NOT replacing any changed or non-existent config files.

I will be keeping the ppa updated as and when libc is updated upstream. If you want to avoid a similar error when that happens, you may want to pin libc-bin to my PPA with a high priority, so it won't update until the "fixed" version is available from the PPA.

Hope this helps, and please post here if anyone has any questions or other feedback.


Try this command. You can open a terminal with Alt+Ctrl+T:

sudo apt-get -o APT::Immediate-Configure=0 -f install

After you can do a sudo apt-get upgrade.

I've had the same problem .... using Ubuntu server ... strange isn't it ?
Hope it'll work for you.


For everybody stuck in the do-dist-upgrade and not being able to run

apt-add-repository ppa:izx/ovz-libc

Just add following line manually to /etc/apt/sources.list:

deb http://ppa.launchpad.net/izx/ovz-libc/ubuntu lucid main