Linux

將 Debian Etch 升級到 Lenny 卡在核心/libc 問題上

  • November 25, 2010

我有一個 Debian Etch (4.0) 系統,目前仍在執行核心 2.4.27-2-386。我想將它升級到 Lenny,但我遇到了核心和 libc6 之間似乎存在循環依賴的問題。

嘗試升級 libc6 時,直接升級(更新 sources.list、apt-get update、apt-get dist-upgrade)失敗:

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

但是,將 Etch 添加回 sources.list(“deb-src http://archive.debian.org/debian etch main contrib non-free”),apt-get update,然後執行“apt-get install -t etch linux-image-2.6" 提示我選擇更具體的包。所以我選擇了一個:“sudo apt-get install -t etch linux-image-2.6.18-6-486”

但這會引發一個關於我無法解決的未滿足依賴項的錯誤:

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
                                    linux-initramfs-tool
 locales: Depends: glibc-2.7-1
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

執行“apt-get -f install”讓我回到第一個錯誤,告訴我安裝 2.6 核心。

我已經嘗試過 apt-get clean、autoclean、rebooting 等。有什麼建議可以繞過它嗎?

我沒有控制台訪問權限,無法從其他媒體啟動等;這是一台我只能通過 SSH 訪問的無頭機器。

在安裝 2.6 核心之前嘗試解除安裝binutilslibc-dev和包。locales這些軟體包對於升級來說不是必需的,並且可以在之後重新安裝。

引用自:https://serverfault.com/questions/205811