Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Debian Etch (4.0) system, currently still running kernel 2.4.27-2-386. I'd like to upgrade it to Lenny, but I'm running into what seems to be a circular dependency between the kernel and libc6.

A straightforward upgrade (update sources.list, apt-get update, apt-get dist-upgrade) fails when it tries to upgrade libc6:

WARNING: POSIX threads library NPTL requires kernel version
2.6.8 or later. If you use a kernel 2.4, please upgrade it
before installing glibc.

The installation of a 2.6 kernel _could_ ask you to install a new libc
first, this is NOT a bug, and should *NOT* be reported. In that case,
please add etch sources to your /etc/apt/sources.list and run:
  apt-get install -t etch linux-image-2.6
Then reboot into this new kernel, and proceed with your upgrade

However, adding Etch back into sources.list ("deb-src etch main contrib non-free"), apt-get update, and then running "apt-get install -t etch linux-image-2.6" prompts me to choose a more specific package. So I choose one: "sudo apt-get install -t etch linux-image-2.6.18-6-486"

But this throws an error about unmet dependencies that I can't get around:

The following packages have unmet dependencies.
  binutils: Depends: libc6 (>= 2.7-1) but 2.3.6.ds1-13etch5 is to be installed
  libc6-dev: Depends: libc6 (= 2.7-18lenny6) but 2.3.6.ds1-13etch5 is to be installed
  linux-image-2.6.18-6-486: Depends: initramfs-tools (>= 0.55) but it is not going to be installed or
                                     yaird (>= 0.0.12-8) but it is not going to be installed or
  locales: Depends: glibc-2.7-1
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Running "apt-get -f install" takes me back to the first error, telling me to install a 2.6 kernel.

I've tried apt-get clean, autoclean, rebooting, etc. Any suggestions on getting around it?

I don't have console access, the ability to boot from other media, etc.; it's a headless machine that I have SSH access to only.

share|improve this question
You might want to edit and include your sources.list file (if possible). – Avery Payne Nov 25 '10 at 0:42
Because you don't have console access you can't install a new kernel? Or is there another reason not to upgrade the kernel? – d-_-b Nov 25 '10 at 1:10
I tried installing a new kernel ("sudo apt-get install -t etch linux-image-2.6.18-6-486" above), but ran into the unmet dependency error with binutils/libc6-dev/etc. – James Nov 26 '10 at 22:36
up vote 1 down vote accepted

Try uninstalling the binutils, libc-dev, and locales packages before you install the 2.6 kernel. Those packages should not be necessary for the upgrade, and can be reinstalled afterwards.

share|improve this answer
This worked, although I didn't do things exactly as described. I removed all the lenny sources from sources.list (leaving just the etch lines from, ran apt-get update, clean, upgrade, dist-upgrade, and that removed a lot of half-installed packages from lenny and updated the kernel to 2.6.18. Once I rebooted into 2.6.18, I could change sources.list back to lenny, update && dist-upgrade, and things seem to have worked. – James Nov 26 '10 at 22:39

Your Answer


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.