[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 ~]$
请帮忙....
答案1
用于yum
更新您的系统。
yum update bash
如果它告诉您“没有标记为更新的软件包”,请尝试重建 yum 缓存,然后更新:
yum clean all
yum makecache fast
yum update bash
如果仍然不起作用,则可能是您使用的镜像存在问题。尝试将您的 yum 配置直接指向“/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 all
、yum makecache fast
,然后yum update bash
再次运行。