关于 glibc 问题的通知

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

关于 glibc 问题的通知

#1

帖子 BigSnake.NET » 2008-03-14 12:53

主题: Hardy regression: glibc 2.7-9ubuntu1 NSS module broken due to toolchain changes
发件人: Colin Watson
日期: Thu, 13 Mar 2008 15:49:35 +0000
收件人: ubuntu-devel-announce@lists.ubuntu.com

https://bugs.launchpad.net/ubuntu/+sour ... bug/201673

This bug affects the Hardy development release (to become Ubuntu 8.04
LTS) ONLY. Stable releases of Ubuntu are NOT affected.

In glibc 2.7-9ubuntu1, many critical programs (such as bash and sudo)
fail to run with various error messages, such as "malloc:
../bash/subst.c:3472: assertion botched" from bash and "*** glibc
detected *** sudo: free(): invalid pointer: 0xb7fabb70 ***" from sudo.
This renders the system unusable. This bug was introduced due to changes
in the default value of LDFLAGS for package builds; while these changes
were useful and had been tested elsewhere, they unexpectedly broke the C
library when it was next built.

The quickest workaround is to copy an older version of the C library
from the initramfs. This will work provided you upgraded from a
relatively recent version of Hardy, so that the initramfs really does
have an older version. DO NOT do this if you encountered this bug
immediately after upgrading from Ubuntu 7.10 or earlier, as it will
break your system badly. Reboot if necessary, and follow these steps:

* Press Escape at start-up time to access the GRUB menu (this is not
necessary on all systems)
* Press 'e' to edit the normal Ubuntu boot options
* Use the cursor keys to reach the line starting with 'kernel'
* Press 'e' again to edit the boot command line
* Change 'ro' to 'rw', remove 'splash', and add 'break=bottom' (without
the quotes) to the end of the boot options
* Press Enter and then 'b' to start up
* After a few moments, you will be presented with an '(initramfs)'
prompt
* Type the following (you may see some 'No such file or directory'
messages after running the cp command, which you can safely ignore):
mount -o remount,rw /root
cp /lib/libc.so.6 /lib/libdl.so.2 /lib/libm.so.6 /lib/libpthread.so.0 /lib/librt.so.1 /root/lib/
# run the following on the 32-bit PC edition (i386)
cp /lib/ld-linux.so.2 /root/lib/
# run the following on the 64-bit PC edition (amd64)
cp /lib64/ld-linux-x86-64.so.2 /root/lib64/
umount /root
reboot
* Start up normally

If this does not work, or if you encountered this bug immediately after
upgrading from Ubuntu 7.10 or earlier, then you will need to follow the
steps below instead.

If you have turned off your system, then you will be unable to start up
and log in normally. In that case, get hold of a Hardy Alpha 6 desktop
CD (since you are running a development version of Ubuntu, this should
be reasonable); you can download it from
http://cdimage.ubuntu.com/releases/hardy/alpha-6/ if you do not have one
to hand, and follow these steps:

* Start up from the desktop CD
* Run Applications -> Accessories -> Terminal (GNOME) or K-Menu ->
System -> Konsole (KDE)

* If you are running the 32-bit PC (i386) edition of Ubuntu, type the
following into the terminal window:
wget http://launchpadlibrarian.net/11110565/ ... 2_i386.deb
* If you are running the 64-bit PC (amd64) edition of Ubuntu, type the
following into the terminal window:
wget http://launchpadlibrarian.net/11109997/ ... _amd64.deb
* If you are running some other edition of Ubuntu, older packages may
be available from http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/

* In any case, continue by finding out the device name for your root
partition, which will look something like '/dev/sda1'. You can run
'sudo fdisk -l' to find out all the available device names. The one
you want will have 'Linux' in the 'System' column. A default
installation will only have one such device; if you have more than
one, then you probably know what you are doing!
* Type the following into the terminal window, replacing DEVICE with
the device name you found above:
sudo mount DEVICE /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo cp libc6_*.deb /mnt/tmp/
# replace 'i386' with 'amd64' if you are running the 64-bit PC edition
sudo chroot /mnt dpkg -i /tmp/libc6_2.7-5ubuntu2_i386.deb
# this step may return some errors; don't worry about them
sudo chroot /mnt dpkg --configure -a
sudo umount /mnt/proc
sudo umount /mnt/dev
sudo umount /mnt
* Reboot

Fixed packages (version 2.7-9ubuntu2) are now on archive.ubuntu.com.
However, many mirrors will not yet have picked this up, so we advise
that you be careful about upgrades for the next couple of days to avoid
reintroducing the bug.

-- Colin Watson [cjwatson@ubuntu.com]



-- ubuntu-devel-announce mailing list ubuntu-devel-announce@lists.ubuntu.com https://lists.ubuntu.com/mailman/listin ... l-announce
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
kaiman
帖子: 127
注册时间: 2007-03-20 14:19

#2

帖子 kaiman » 2008-03-14 16:03

多谢!我搞定了,分享一下过程,大家把他完善!

* 启动时按光标键或 Escape 键出现 GRUB 菜单
* 按光标键移动到出问题的 8.04 按 'e' 编辑对应的菜单
* 按下光标键移动到 'kernel'行
* 再按 'e' 编辑该行(核心引导参数)
* 将 'ro' 改为 'rw', 删除 'splash', 在末尾添加 break=bottom
* 回车确认然后按 'b' 引导
* 过一会儿会看到 '(initramfs)'提示
* 敲下面的命令:
mount -o remount,rw /root
cp /lib/libc.so.6 /lib/libdl.so.2 /lib/libm.so.6 /lib/libpthread.so.0 /lib/librt.so.1 /root/lib/
# 我没有/lib/libm.so.6所以报该文件找不到。
# 32-bit PC 用如下命令 (i386)
cp /lib/ld-linux.so.2 /root/lib/
# 64-bit PC 用如下命令 (amd64)
cp /lib64/ld-linux-x86-64.so.2 /root/lib64/
umount /root
reboot

重启后还有些问题,但能正常进入桌面了。
我解决如下:
删除 /var/cache/apt/archives/下所有.deb的文件
然后将软件源定在“主服务器”再更新。
onlyiknow
帖子: 527
注册时间: 2007-05-06 2:18

#3

帖子 onlyiknow » 2008-03-14 20:34

问2楼,那个启动项要改回来吗?
头像
jervis0211
帖子: 170
注册时间: 2007-05-07 8:21

#4

帖子 jervis0211 » 2008-03-15 1:36

答3楼,那个更改只是暂时的,下次重启就还是原来的
回复