ShellShock – 无法更新CentOS 5.7

[user@server1 ~]$ wget http://mirror.centos.org/centos-5/5/updates/x86_64/RPMS/bash-3.2-33.el5.1.x86_64.rpm [user@server1 ~]$ sudo rpm -Uvh bash-3.2-33.el5.1.x86_64.rpm warning: bash-3.2-33.el5.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID e8562897 Preparing... ########################################### [100%] package bash-3.2-33.el5.1.x86_64 is installed [user@server1 ~]$ exit [user@server1 ~]$ rpm -q bash bash-3.2-32.el5 bash-3.2-33.el5.1 [user@server1 ~]$ bash --version GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu) Copyright (C) 2005 Free Software Foundation, Inc. [user@server1 ~]$ foo='() { echo not patched; }' bash -c foo not patched [user@server1 ~]$ 

请帮忙….

使用yum来更新你的系统。

 yum update bash 

如果它告诉你'没有标记为更新的包'尝试重buildyumcaching然后更新:

 yum clean all yum makecache fast yum update bash 

如果仍然不起作用,那么可能是您使用的镜像存在问题。 尝试将yumconfiguration直接指向“/etc/yum.repos.d/CentOS-Base.repo”文件中的“mirror.centos.org”:

 sudo sed -i -e 's/^mirrorlist=/#mirrorlist=/' -e 's/^#baseurl=/baseurl=/' /etc/yum.repos.d/CentOS-Base.repo 

:我提供这个sed命令,假设你的“CentOS-Base.repo”文件有“baseurl”注释,并指向“mirror.centos.org”。

然后运行yum clean allyum makecache fast ,然后yum update bash再次yum update bash