Problems upgrading your Ubuntu Server to 12.04 Ubuntu Precise Pangolin?

If you are running a Ubuntu server on a VPS, the latest upgrade may have brought dismay with warnings and errors and finally failure. Some of the sample output can look like:

Processing triggers for man-db …
locale: /lib/x86_64-linux-gnu/ version `GLIBC_2.15′ not found (required by locale)
locale: /lib/x86_64-linux-gnu/ version `GLIBC_2.14′ not found (required by locale)

A fatal error occurred

Please report this as a bug and include the files
/var/log/dist-upgrade/main.log and /var/log/dist-upgrade/apt.log in
your report. The upgrade has aborted.
Your original sources.list was saved in

SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1)
ERROR:root:SystemError from cache.commit(): installArchives() failed

Could not install the upgrades

The upgrade has aborted. Your system could be in an unusable state. A
recovery will run now (dpkg –configure -a).

Please report this bug in a browser at and
attach the files in /var/log/dist-upgrade/ to the bug report.
installArchives() failed

Setting up libsnmp-base (5.4.3~dfsg-2.4ubuntu1.1) …
dpkg: dependency problems prevent configuration of libnih-dbus1:
libnih-dbus1 depends on libnih1 (= 1.0.3-4ubuntu9); however:
Version of libnih1 on system is 1.0.3-4ubuntu2.
dpkg: error processing libnih-dbus1 (–configure):
dependency problems – leaving unconfigured
Errors were encountered while processing:

Upgrade complete

The upgrade has completed but there were errors during the upgrade

dpkg: error processing libnih-dbus1 (–configure):

dependency problems – leaving unconfigured
Errors were encountered while processing:

and so on.

The main reason for this is that your host is running a kernel that is no longer supported, so the upgrade kind of… refuses. To be sure that this is the problem, run:

uname -r

if you get 2.6.18 then this post is likely to help you. The problem apparently occurs because “your host is almost certainly running OpenVZ on a 2.6.18 kernel (all OpenVZ containers share the host kernel)” according to Ishaan Dalal. “The problem is that the libc 2.15 included with Precise requires a minimum 2.6.24 kernel to function.” He is maintaining a repository with a workaround for this.

To use the repository, add it to your sources the easy way like this:

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

Chances are that this may not work for the same reason the upgrade didn’t – because stuff is broken, in which case, you add the following lines to /etc/apt/sources.list

deb precise main
deb-src precise main

And run:

sudo apt-key adv –keyserver –recv-keys BFAB4BD9

After which if you run

apt-get update

apt-get install -f

apt-get dist-upgrade

you are likely to go smoothly into the upgrade. Follow prompts, etc. Reboot when done, and you should be fine.

…. or at least I was.

Comments 1

Leave a Reply

Your email address will not be published. Required fields are marked *