╃苍狼山庄╃╃苍狼山庄╃

Clang出品,
必属精品!

Debian 7 升级遇到libc6 (>= 2.14)错误

在升级Debian7的系统内核时,碰到了“depends on libc6 (>= 2.14); however:”错误,详细错误信息如下:

root@Debian7:~/kernel# dpkg -i *.deb
Selecting previously unselected package linux-headers-4.9.47-040947-generic.
(Reading database ... 27293 files and directories currently installed.)
Unpacking linux-headers-4.9.47-040947-generic (from linux-headers-4.9.47-040947-generic_4.9.47-040947.201709020231_amd64.deb) ...
Selecting previously unselected package linux-headers-4.9.47-040947.
Unpacking linux-headers-4.9.47-040947 (from linux-headers-4.9.47-040947_4.9.47-040947.201709020231_all.deb) ...
Selecting previously unselected package linux-image-4.9.47-040947-generic.
Unpacking linux-image-4.9.47-040947-generic (from linux-image-4.9.47-040947-generic_4.9.47-040947.201709020231_amd64.deb) ...
Done.
dpkg: dependency problems prevent configuration of linux-headers-4.9.47-040947-generic:
 linux-headers-4.9.47-040947-generic depends on libc6 (>= 2.14); however:
  Version of libc6:amd64 on system is 2.13-38+deb7u12.

dpkg: error processing linux-headers-4.9.47-040947-generic (--install):
 dependency problems - leaving unconfigured
Setting up linux-headers-4.9.47-040947 (4.9.47-040947.201709020231) ...
Setting up linux-image-4.9.47-040947-generic (4.9.47-040947.201709020231) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.9.47-040947-generic /boot/vmlinuz-4.9.47-040947-generic
update-initramfs: Generating /boot/initrd.img-4.9.47-040947-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.9.47-040947-generic /boot/vmlinuz-4.9.47-040947-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-4.9.47-040947-generic
Found initrd image: /boot/initrd.img-4.9.47-040947-generic
Found linux image: /boot/vmlinuz-3.2.0-4-amd64
Found initrd image: /boot/initrd.img-3.2.0-4-amd64
done
Errors were encountered while processing:
 linux-headers-4.9.47-040947-generic
root@Debian7:~/kernel#

因libc6版本太低导致linux-headers-4.9.47-040947-generic安装失败,并且MySql WorkBench, Eclipse-4.4等很多常用开发工具都要求 glibc 版本 >= 2.14,而 Wheezy 仓库中 glibc 最高仅为 2.13。为了让这些工具正常使用,我们只能用 Wheezy unstable 版的 glibc。

升级方法如下:

在/etc/apt/sources.list 文件中添加软件源:

# 注意:下面这两条源只需要添加一个就可以,根据自己服务器选择
# 下面这行添加的是国内镜像,如果是国内服务器建议用这个
echo "deb http://mirrors.ustc.edu.cn/debian sid main" >> /etc/apt/sources.list
# 下面这行是官方的,如果是国外服务器建议用这个
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

即可自动安装 glibc 至新版本。

[info_box]注意:安装完成后务必将上面新添加的源从 sources.list 中删除,否则你下次再 apt-get install 其它软件的时候,apt-get 就会提示你要删除一大片库文件,如果你选择了Y,gnome桌面就被删掉了。[/info_box]

本原创文章未经允许不得转载 | 当前页面:╃苍狼山庄╃ » Debian 7 升级遇到libc6 (>= 2.14)错误

评论

文章评论已关闭!