如何在CentOS 7上安装Bash 5.0
这是续集。
您可以通过以下链接以PDF格式下载本文,以为我们提供支持。
以PDF格式下载指南
关
这是续集。
这是续集。
这是续集。
重击 SH兼容的命令语言解释器,执行从标准输入或文件中读取的命令。 Bash还结合了Korn和C shell(ksh和csh)的便利功能。本教程向Linux用户展示了如何在CentOS 7上安装Bash 5.0。
CentOS 7 Linux机器上可用的Bash版本是4.2。可以通过在终端中运行命令bash –version来验证。
$ bash --version
GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
在CentOS 7上安装Bash 5.0
截至本文为止, 最新稳定版本 Bash的5.0。默认的上游存储库中没有此版本。必须从源构建。
步骤1:更新系统
更新CentOS 7机器。
sudo yum -y update
如果有内核更新,请重新引导操作系统。
sudo reboot
步骤2:在CentOS 7上安装开发工具
在CentOS 7上安装开发人员工具。
sudo yum -y install curl
sudo yum -y groupinstall "Development Tools"
下载Bash 5.0 tar文件。
curl -O https://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz
步骤3:在CentOS 7上安装Bash 5.0
解压缩下载的存档。
tar xvf bash-5.0.tar.gz
配置,设置
cd bash-5.0
./configure
验证命令执行输出是否没有错误。
.....
config.status: creating Makefile
config.status: creating builtins/Makefile
config.status: creating lib/readline/Makefile
config.status: creating lib/glob/Makefile
config.status: creating lib/intl/Makefile
config.status: creating lib/malloc/Makefile
config.status: creating lib/sh/Makefile
config.status: creating lib/termcap/Makefile
config.status: creating lib/tilde/Makefile
config.status: creating doc/Makefile
config.status: creating support/Makefile
config.status: creating po/Makefile.in
config.status: creating examples/loadables/Makefile
config.status: creating examples/loadables/Makefile.inc
config.status: creating examples/loadables/perl/Makefile
config.status: creating support/bash.pc
config.status: creating support/bashbug.sh
config.status: creating config.h
config.status: executing default-1 commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: executing default commands
[[email protected] bash-5.0]#
在CentOS 7上安装Bash 5.0。
make
sudo make install
在CentOS 7上检查Bash的当前版本。
$ bash --version
GNU bash, version 5.0.0(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
现在,您可以构建需要Bash 4.2或更高版本的应用程序。
其他指南:
在CentOS 7上安装Git 2
在CentOS 7上安装Python 3.8
这是续集。
您可以通过以下链接以PDF格式下载本文,以为我们提供支持。
以PDF格式下载指南
关
这是续集。
这是续集。
这是续集。