AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 126875
Accepted
exhuma
exhuma
Asked: 2010-03-28 04:38:32 +0800 CST2010-03-28 04:38:32 +0800 CST 2010-03-28 04:38:32 +0800 CST

在 debian 3.1 上升级内核的问题

  • 772

我在远程服务器场中有一个很旧的盒子。所以我没有直接访问权限。仅远程 SSH(并通过 SSH 连接到串行控制台)。我已经很久没有更新这个盒子了。现在,每当我想安装一个新包时,就会出现对 glibc 的依赖。不幸的是,glibc 的安装依赖于 2.6 内核,而我正在运行一个古老的 2.4 内核(升级的另一个原因)。

问题是,新内核的安装对 glibc 有间接(通过语言环境)依赖。所以,要安装 glibc,我需要一个新内核。对于新内核,我需要升级 glibc。基本上我被阻止了。考虑到我没有“硬件”访问权限,最好的方法是什么?

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

[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。但这让我遇到了同样的问题。

[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.

有任何想法吗?

debian kernel glibc
  • 2 2 个回答
  • 952 Views

2 个回答

  • Voted
  1. Best Answer
    Phil Ross
    2010-03-28T09:12:39+08:002010-03-28T09:12:39+08:00

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

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

    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 升级到最新的软件包。

    然而,Sarge 在 2008 年 3 月 31 日被取消支持,所以最好将机器升级到 Lenny。由于 Lenny 是自 Sarge 以来发布的第二个主要版本,因此首先升级到中间版本 Etch 可能更容易。请查看Etch和Lenny发行说明的第 4 部分,了解如何执行此操作的详细信息。在开始之前确保您有一个可行的备份也是值得的,以防万一出现问题。

    • 3
  2. Chris Lercher
    2010-03-28T05:50:46+08:002010-03-28T05:50:46+08:00

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

    dpkg您可以使用选项安装软件包--force-depends,这会将所有依赖关系问题变成警告。

    我用它来安装打印机驱动程序,它工作得很好——因为从技术上讲,一切都安装正确。唯一的问题是,该 aptitude 之后报告了损坏的包裹。我不知道如何修复它们(打印机驱动程序并不重要,无法投入大量时间,所以我只是将其卸载)。

    • 0

相关问题

  • 关闭 FTP

  • 如何在同一台电脑上从 putty 连接 debian vmware

  • debian- 文件到包的映射

  • Debian Ubuntu 网络管理器错误 [关闭]

  • 为本地网络中的名称解析添加自定义 dns 条目

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    从 IP 地址解析主机名

    • 8 个回答
  • Marko Smith

    如何按大小对 du -h 输出进行排序

    • 30 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    MikeN 在 Nginx 中,如何在维护子域的同时将所有 http 请求重写为 https? 2009-09-22 06:04:43 +0800 CST
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    0x89 bash中的双方括号和单方括号有什么区别? 2009-08-10 13:11:51 +0800 CST
  • Martin Hope
    Kyle Brandt IPv4 子网如何工作? 2009-08-05 06:05:31 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve