我有一套 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-srchttp://archive.debian.org/debianetch 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 访问它。
答案1
在安装 2.6 内核之前,请尝试卸载binutils
、libc-dev
和locales
软件包。这些软件包对于升级来说不是必需的,可以在升级之后重新安装。