【发布时间】:2012-06-07 11:33:54
【问题描述】:
我听说我可以使用 apt-get install libc6 来做到这一点,但我需要在 /etc/apt/sources.list 中添加一些内容以接收最新的 glibc 版本。我该怎么办?
【问题讨论】:
我听说我可以使用 apt-get install libc6 来做到这一点,但我需要在 /etc/apt/sources.list 中添加一些内容以接收最新的 glibc 版本。我该怎么办?
【问题讨论】:
通过编辑perror's answer 中的建议,我能够在Debian Wheezy 中安装libc6 2.17:
重要
您需要按 CTRL-ALT-F1 退出显示管理器。
然后你可以用sudo /etc/init.d/slim stop停止x(slim)
(将 slim 替换为 mdm 或 lightdm 或其他)
将以下行添加到文件/etc/apt/sources.list:
deb http://ftp.debian.org/debian 实验主干
应改为:
deb http://ftp.debian.org/debiansid main
然后关注 perror 的其余帖子:
更新您的包裹数据库:
apt-get 更新
安装eglibc 包:
apt-get -t sid install libc6-amd64 libc6-dev libc6-dbg
重要
完成更新libc6 后,重新启动计算机,您应该注释掉或删除刚刚添加的 sid 源 (deb http://ftp.debian.org/debian sid main),否则您可能会将整个发行版升级到 sid。
希望这会有所帮助。我花了一段时间才弄清楚。
【讨论】:
apt-get -t sid install libc6-amd64 libc6-dev libc6-dbg 替换为 apt-get -t sid install libc6 libc6-dev libc6-dbg 但它工作正常,因为它是安装的 amd64 版本
deb http://ftp.debian.org/debian sid main 文件的deb http://ftp.debian.org/debian sid main 行后有什么问题吗?
stable 分支上跟踪来自sid/experimental 的仅一个包裹。 +1 @JürgLehni 评论。
事实上,你现在不能轻易做到(在我写这篇文章的时候)。我将尝试解释原因。
首先是glibc is no more,它已被eglibc project 包含。而且,Debian 发行版在不久前切换到 eglibc(参见 here 和 there,甚至在 glibc source package page 上)。所以,你应该考虑通过这种命令安装eglibc package:
apt-get install libc6-amd64 libc6-dev libc6-dbg
用你想要的架构替换amd64(查看包列表here)。
不幸的是,unstable 和testing 中的 eglibc 包版本最高只有 2.13。只有 experimental 提供了这个库的 2.17 版本。所以,如果你真的想在 2.15 或更高版本中拥有它,你需要从实验版本开始安装包(不推荐)。以下是以root身份实现的步骤:
将以下行添加到文件/etc/apt/sources.list:
deb http://ftp.debian.org/debian experimental main
更新您的包裹数据库:
apt-get update
安装 eglibc 包:
apt-get -t experimental install libc6-amd64 libc6-dev libc6-dbg
祈祷...
嗯,就是这样。
【讨论】:
您的脚本也包含错误,例如,如果您安装了 dos2unix,您的安装工作正常,但如果您不喜欢我所做的,那么它将因依赖问题而失败。
我偶然发现了这个,因为我正在制作一个脚本文件给我刚接触 Linux 的朋友,因为我在 windows 上制作了脚本,所以我指示他安装它,当时我没有 dos2unix安装后出现错误。
这是我为您的解决方案制作的脚本的副本,但安装了 dos2unix。
#!/bin/sh
echo "deb http://ftp.debian.org/debian sid main" >> /etc/apt/sources.list
apt-get update
apt-get -t sid install libc6 libc6-dev libc6-dbg
echo "Please remember to hash out sid main from your sources list. /etc/apt/sources.list"
这个脚本已经在 3 台机器上测试过,没有任何错误。
【讨论】:
yours是什么意思。