首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >debian 3.1内核升级问题

debian 3.1内核升级问题
EN

Server Fault用户
提问于 2010-03-27 12:38:32
回答 2查看 957关注 0票数 3

我在一个远程服务器场里有一个很老的盒子。所以我不能直接进入。只有远程SSH (并通过SSH到串行控制台)。我很久没更新这个盒子了。现在,每当我想要安装一个新包时,都会出现一个对glibc的依赖关系。不幸的是,glibc的安装依赖于2.6内核,而我正在运行一个值得尊敬的2.4内核(这是升级的又一个原因)。

问题是,新内核的安装与glibc有一个间接的(超过地区的)依赖关系。所以,要安装glibc,我需要一个新的内核。对于一个新内核,我需要升级glibc。基本上我被堵住了。考虑到我没有“硬件”访问权限,什么是最好的方法?

以下是升级过程的快速记录:

代码语言:javascript
复制
[green:~]% sudo aptitude install linux-image-686
Reading Package Lists... Done
Building Dependency Tree
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
The following packages are unused and will be REMOVED:
  gcc-4.3-base
The following NEW packages will be automatically installed:
  dash libc6-i686 libparse-recdescent-perl linux-image-2.6-686
  linux-image-2.6.18-6-686 module-init-tools yaird
The following packages have been kept back:
  adduser apache2 apache2-mpm-prefork apache2-utils apache2.2-common apt
  apt-utils aptitude autoconf autotools-dev awstats base-files base-passwd
  [...snip...]
  util-linux vacation vim vim-common wamerican wbritish wget whiptail whois
  wwwconfig-common zlib1g
The following NEW packages will be installed:
  dash libc6-i686 libparse-recdescent-perl linux-image-2.6-686
  linux-image-2.6.18-6-686 linux-image-686 module-init-tools yaird
The following packages will be upgraded:
  hotplug libc6
2 packages upgraded, 8 newly installed, 1 to remove and 277 not upgraded.
Need to get 0B/22.7MB of archives. After unpacking 52.1MB will be used.
Do you want to continue? [Y/n/?]
Writing extended state information... Done
Preconfiguring packages ...
(Reading database ... 34065 files and directories currently installed.)
Preparing to replace libc6 2.3.6.ds1-13 (using .../libc6_2.7-18lenny2_i386.deb) ...
Checking for services that may need to be restarted...
Checking init scripts...
WARNING: init script for postgresql not found.

  [ --- libc6 config screen appears here --- ]

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
dpkg: error processing /var/cache/apt/archives/libc6_2.7-18lenny2_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.7-18lenny2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ack!  Something bad happened while installing packages.  Trying to recover:
dpkg: dependency problems prevent configuration of locales:
locales depends on glibc-2.7-1; however:
  Package glibc-2.7-1 is not installed.
dpkg: error processing locales (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
locales
Reading Package Lists... Done
Building Dependency Tree
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done

现在,如果我按提示执行指令,我会得到以下信息。请注意,我使用的是aptitude而不是apt-get,以便从更好的依赖跟踪中获益。我先试了一下apt-get。但这也让我有了同样的问题。

代码语言:javascript
复制
[green:~]% sudo aptitude install -t etch linux-image-2.6.26-2-686
Reading Package Lists... Done
Building Dependency Tree
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
E: Unable to correct problems, you have held broken packages.
E: Unable to correct dependencies, some packages cannot be installed
E: Unable to resolve some dependencies!
Some packages had unmet dependencies.  This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

The following packages have unmet dependencies:
  linux-image-2.6.26-2-686: Depends: initramfs-tools (>= 0.55) but it is not installable or
                yaird (>= 0.0.13) but it is not installable or
                linux-initramfs-tool which is a virtual package.

有什么想法吗?

EN

回答 2

Server Fault用户

回答已采纳

发布于 2010-03-27 17:12:39

在主题中,您说机器正在运行Debian3.1 (Sarge)。但是,您发布的glibc依赖项和错误消息表明您正在尝试从Debian5.0 (Lenny)安装软件包。这可能意味着您的/etc/apt/sources.list文件引用了stable而不是sarge (也就是说,您正在从当前的最新稳定版本中获取包,而不是您已经安装的版本)。

尝试编辑/etc/apt/sources.list,用sarge替换对stable的所有引用。例如,一行如下:

deb http://ftp.uk.debian.org/debian/ stable main non-free contrib

应成为:

deb http://ftp.uk.debian.org/debian/ sarge main non-free contrib

运行aptitude update,然后您应该能够从sarge升级到最新的包。

然而,在2008年3月31日,军士长是脱支,所以最好将机器升级到Lenny。因为Lenny是继Sarge之后发布的第二个主要版本,所以升级到中间版本Etch (第一)可能会更容易。查看蚀刻莱尼发布说明的第4节,了解如何做到这一点。在启动之前,还需要确保您有一个可行的备份,以防出了问题。

票数 3
EN

Server Fault用户

发布于 2010-03-27 13:50:46

我有一个想法,但它可能会导致软件包损坏,所以先备份一下,或者在其他机器上尝试一下:

您可以通过dpkg安装一个带有选项--force-depends的包,该选项将所有依赖问题转化为警告。

我用它来安装打印机驱动程序,它运行良好--因为从技术上讲,所有的东西都安装正确。唯一的问题是,事后智能报告了破损的包裹。我不知道如何修复它们(而且打印机驱动程序不够重要,不足以花费大量时间,所以我只是卸载它)。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/126875

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档