mac 安装 bash 5

2021-05-11  本文已影响0人  shen33

Mac 在执行 mapfile 等命令的时候回报 command not found。
那是因为mac 内置的bash 版本是 3.0+,而 mapfile 命令需要 5.0 +,所以需要修改内置版本。

具体操作如下
查看 bash 版本

bash -version

下载 bash 5.0

bash 5.0 下载

cd ~/Downloads/bash-5.0
./configure

安装

make install

测试是否安装成功

bash -version

参考网站: https://scriptingosx.com/2019/02/install-bash-5-on-macos/

上一篇 下一篇

猜你喜欢

热点阅读