Bash 软件包包含 Bourne-Again SHell。
安装 Bash解压软件包:
cd /sources tar xf bash-5.1.8.tar.gz cd bash-5.1.8
准备编译 Bash:
./configure --prefix=/usr
--docdir=/usr/share/doc/bash-5.1.8
--without-bash-malloc
--with-installed-readline
编译该软件包:
make
如果不运行测试套件,跳到 “安装该软件包”。
为了准备进行测试,确保 tester 用户可以写入源代码目录:
chown -Rv tester .
该软件包的测试套件被设计为以非 root 用户身份运行,且该用户必须是标准输入所连接的终端的所有者。
为了满足这一条件,使用 Expect 生成一个新的伪终端,并以 tester 用户身份运行测试:
su -s /usr/bin/expect tester << EOF set timeout -1 spawn make tests expect eof lassign [wait] _ _ _ value exit $value EOF
编译该软件包:
make install
执行新编译的 bash 程序 (替换当前正在执行的版本):
exec /bin/bash --login +h
安装完成后清理工作:
cd .. rm -rf bash-5.1.8
本次分享到此结束啦~
如果觉得文章对你有帮助,点赞、收藏、关注、评论,一键四连支持,你的支持就是我创作最大的动力。
❤️ 技术交流可以 关注公众号:Lucifer三思而后行 ❤️



