BASH运行程序出错:ERROR: Bash 4.4 or later is required (you are using Bash 4.2).Consider upgradin...

ERROR: Bash 4.4 or later is required (you are using Bash 4.2).Consider upgrading your distribution to get a more recent Bash version.

今天在运行某个程序编译安装完毕后使用使用bash执行,结果出现了上述提示
原因是自己CentOS7的bash版本太低了需要更新bash版本

#查看自己bash的版本发现是4.2版本
/bin/bash --version
#下载bash5.0版本
wget http://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz
#解压
tar zxvf bash-5.0.tar.gz
#进入目录
cd bash-5.0
#编译
./configure && make && make install
#创建软连接
mv /bin/bash /bin/bash.bak
ln -s /usr/local/bin/bash /bin/bash
#最后重启服务器配置即可生效

BASH运行程序出错:ERROR: Bash 4.4 or later is required (you are using Bash 4.2).Consider upgradin..._第1张图片

你可能感兴趣的:(运维)