Linux /bin/bash升级到version 5.1.0

本文详细介绍了如何将Linux系统的/bin/bash从4.2.46版本升级到5.1.0。首先,检查系统信息,确认Centos7.9和内核版本。然后,下载最新bash安装包并进行解压安装。通过./configure、make && make install步骤完成编译安装。最后,配置新版本bash,将其链接到/bin/目录,并重启系统使更改生效。

目录

一、检查系统信息版本

二、下载最新/bin/bash版本安装包

三、解压并安装/bin/bash

四、配置新版本/bin/bash


一、检查系统信息版本

目前操作系统版本是Centos7.9,内核版本5.16.13(已经升级过的,升级方法见其它文章)

/bin/bash版本4.2.46

二、下载最新/bin/bash版本安装包

本次下载/bin/bash版本为5.1.0

Index of /gnu/bashhttp://ftp.gnu.org/gnu/bash/

三、解压并安装/bin/bash

# tar zvxf bash-5.1.tar.gz

# cd bash-5.1

# ./configure

# make && make install

四、配置新版本/bin/bash

因为bash默认是安装在/usr/local/bin/目录下,所以需要创建一个链接到 /bin/目录下,安装完毕后需要重启生效!

# mv /bin/bash /bin/bash.bak && ln -s /usr/local/bin/bash /bin/bash

MacOS M2 Homebrew php8.0.26安装Swoole5.1.0报错running: make /bin/sh /private/tmp/pear/temp/pear-build-rootcnxRqT/swoole-5.1.0/libtool --mode=compile g++ -I. -I/private/tmp/pear/temp/swoole -I/private/tmp/pear/temp/pear-build-rootcnxRqT/swoole-5.1.0/include -I/private/tmp/pear/temp/pear-build-rootcnxRqT/swoole-5.1.0/main -I/private/tmp/pear/temp/swoole -I/opt/homebrew/Cellar/php@8.0/8.0.30_6/include/php -I/opt/homebrew/Cellar/php@8.0/8.0.30_6/include/php/main -I/opt/homebrew/Cellar/php@8.0/8.0.30_6/include/php/TSRM -I/opt/homebrew/Cellar/php@8.0/8.0.30_6/include/php/Zend -I/opt/homebrew/Cellar/php@8.0/8.0.30_6/include/php/ext -I/opt/homebrew/Cellar/php@8.0/8.0.30_6/include/php/ext/date/lib -I/thirdparty -I/private/tmp/pear/temp/swoole -I/private/tmp/pear/temp/swoole/include -I/private/tmp/pear/temp/swoole/ext-src -I/private/tmp/pear/temp/swoole/thirdparty -I/private/tmp/pear/temp/swoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -DENABLE_PHP_SWOOLE -c /private/tmp/pear/temp/swoole/ex t-src/php_swoole.cc -o ext-src/php_swoole.lo mkdir ext-src/.libs g++ -I. -I/private/tmp/pear/temp/swoole -I/private/tmp/pear/temp/pear-build-rootcnxRqT/swoole-5.1.0/include -I/private/tmp/pear/temp/pear-build-rootcnxRqT/swoole-5.1.0/main -I/private/tmp/pear/temp/swoole -I/opt/homebrew/Cellar/php@8.0/8.0.30_6/include/php -I/opt/homebrew/Cellar/php@8.0/8.0.30_6/include/php/main -I/opt/homebrew/Cellar/php@8.0/8.0.30_6/include/php/TSRM -I/opt/homebrew/Cellar/php@8.0/8.0.30_6/include/php/Zend -I/opt/homebrew/Cellar/php@8.0/8.0.30_6/include/php/ext -I/opt/homebrew/Cellar/php@8.0/8.0.30_6/include/php/ext/date/lib -I/thirdparty -I/private/tmp/pear/temp/swoole -I/private/tmp/pear/temp/swoole/include -I/private/tmp/pear/temp/swoole/ext-src -I/private/tmp/pear/temp/swoole/thirdparty -I/private/tmp/pear/temp/swoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -DENABLE_PHP_SWOOLE -c /private/tmp/pear/temp/swoole/ext-src/php_swoole.cc -fno-common -DPIC -o ext-src/.libs/php_swoole.o In file included from /private/tmp/pear/temp/swoole/ext-src/php_swoole.cc:21: /opt/homebrew/Cellar/php@8.0/8.0.30_6/include/php/ext/pcre/php_pcre.h:23:10: fatal error: 'pcre2.h' file not found 23 | #include "pcre2.h" | ^~~~~~~~~ 1 error generated. make: *** [ext-src/php_swoole.lo] Error 1 ERROR: `make' failed
07-19
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值