2009年5月7日星期四

一個rpm -e --allmatches --nodeps glibc-xxx-xxx就可以把RedHat linux徹底的幹掉了

因为production envrionment glibc有bug,会导致Oracle server random reboot, 在下面做了一个实验,记录如下:

原始的:
[root@crdb11gstd ~]# rpm -qa |grep glibc
glibc-2.5-18
glibc-devel-2.5-18
compat-glibc-2.3.4-2.26
glibc-common-2.5-18
glibc-devel-2.5-18
compat-glibc-headers-2.3.4-2.26
glibc-headers-2.5-18
compat-glibc-2.3.4-2.26
glibc-2.5-18



想update成为的:
[root@crdb11gstd ~]# rpm -Uvh glibc-common-2.5-24.x86_64.rpm
warning: glibc-common-2.5-24.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
error: Failed dependencies:
glibc-common = 2.5-18 is needed by (installed) glibc-2.5-18.i686
glibc-common = 2.5-18 is needed by (installed) glibc-2.5-18.x86_64
[root@crdb11gstd ~]# rpm -Uvh glibc-2.5-24.i686.rpm
warning: glibc-2.5-24.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
error: Failed dependencies:
glibc-common = 2.5-24 is needed by glibc-2.5-24.i686
[root@crdb11gstd ~]# rpm -Uvh glibc-common-2.5-24.x86_64.rpm
warning: glibc-common-2.5-24.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
error: Failed dependencies:
glibc-common = 2.5-18 is needed by (installed) glibc-2.5-18.i686
glibc-common = 2.5-18 is needed by (installed) glibc-2.5-18.x86_64

致命的!
[root@crdb11gstd ~]# rpm -e --allmatches --nodeps glibc-2.5-18
warning: /etc/localtime saved as /etc/localtime.rpmsave
error: %trigger(redhat-lsb-3.1-12.3.EL.x86_64) scriptlet failed, exit status 255
error: %trigger(redhat-lsb-3.1-12.3.EL.i386) scriptlet failed, exit status 255
error: %postun(glibc-2.5-18.i686) scriptlet failed, exit status 255

系统崩溃了!:(

[root@crdb11gstd ~]# rpm -e --allmatches --nodeps glibc-common-2.5-18
-bash: /bin/rpm: No such file or directory
[root@crdb11gstd ~]# rpm
rpm rpm2cpio rpmbuild rpmdb rpmgraph rpmquery rpmsign rpmverify
[root@crdb11gstd ~]# rpm -e --allmatches --nodeps glibc-common-2.5-18
-bash: /bin/rpm: No such file or directory
[root@crdb11gstd ~]# man rpm
-bash: /usr/bin/man: No such file or directory
[root@crdb11gstd ~]# man rpm
-bash: /usr/bin/man: No such file or directory
[root@crdb11gstd ~]# rpm
rpm rpm2cpio rpmbuild rpmdb rpmgraph rpmquery rpmsign rpmverify
[root@crdb11gstd ~]# rpm
rpm rpm2cpio rpmbuild rpmdb rpmgraph rpmquery rpmsign rpmverify
[root@crdb11gstd ~]# rpm
rpm rpm2cpio rpmbuild rpmdb rpmgraph rpmquery rpmsign rpmverify
[root@crdb11gstd ~]# rpm --help
-bash: /bin/rpm: No such file or directory
[root@crdb11gstd ~]#
[root@crdb11gstd ~]# ls
-bash: /bin/ls: No such file or directory
[root@crdb11gstd ~]# rp
rpcclient rpcgen rpc.idmapd rpc.lockd rpc.nfsd rpc.statd rpm rpmbuild rpmgraph rpmsign
rpcdebug rpc.gssd rpcinfo rpc.mountd rpc.rquotad rpc.svcgssd rpm2cpio rpmdb rpmquery rpmverify
[root@crdb11gstd ~]# rp
rpcclient rpcgen rpc.idmapd rpc.lockd rpc.nfsd rpc.statd rpm rpmbuild rpmgraph rpmsign
rpcdebug rpc.gssd rpcinfo rpc.mountd rpc.rquotad rpc.svcgssd rpm2cpio rpmdb rpmquery rpmverify
[root@crdb11gstd ~]# rp
rpcclient rpcgen rpc.idmapd rpc.lockd rpc.nfsd rpc.statd rpm rpmbuild rpmgraph rpmsign
rpcdebug rpc.gssd rpcinfo rpc.mountd rpc.rquotad rpc.svcgssd rpm2cpio rpmdb rpmquery rpmverify

[root@crdb11gstd ~]# where rpm
-bash: where: command not found
[root@crdb11gstd ~]# where
-bash: where: command not found
[root@crdb11gstd ~]# cd

[root@crdb11gstd ~]# rpm
-bash: /bin/rpm: No such file or directory
[root@crdb11gstd ~]# rpm
-bash: /bin/rpm: No such file or directory
[root@crdb11gstd ~]# gcc
gcc gcc34 gccmakedep
[root@crdb11gstd ~]# gcc
gcc gcc34 gccmakedep
[root@crdb11gstd ~]# gcc
-bash: /usr/bin/gcc: No such file or directory
[root@crdb11gstd ~]# gcc
-bash: /usr/bin/gcc: No such file or directory
[root@crdb11gstd ~]# cd /usr/bin
[root@crdb11gstd bin]# ls
-bash: /bin/ls: No such file or directory
[root@crdb11gstd bin]# cd /user/
-bash: cd: /user/: No such file or directory
[root@crdb11gstd bin]# cd /usr
[root@crdb11gstd usr]# ls
-bash: /bin/ls: No such file or directory
[root@crdb11gstd usr]# cd /where
-bash: cd: /where: No such file or directory
[root@crdb11gstd usr]# cd /
[root@crdb11gstd /]# ls
-bash: /bin/ls: No such file or directory
[root@crdb11gstd /]# rpm
-bash: /bin/rpm: No such file or directory
[root@crdb11gstd /]#
[root@crdb11gstd /]#
[root@crdb11gstd /]#
系统嗝屁了

一個rpm -e --allmatches --nodeps glibc-xxx-xxx就可以把RedHat linux徹底的幹掉了。
网上google一下:

Avoid touching glibc. Too much other stuff depends on that; upgrading it will lead to cascading problems with every other app on the server.

没有评论:

发表评论