1. 问题
前几天升级了MacOS Catalina 10.15.1版本,今天使用flutter项目编译iOS项目时,出现
Finished with error: ProcessException: No such file or directory
Command: /usr/local/bin/pod install --verbose
于是想打开终端,通过 flutter clean 来清理下编译文件,然后在重新编译,结果控制台出现以下信息:
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
2.搜索并解决问题
现在使用的是bash风格,提示语告知现在新系统的shell已经更换为zsh,请用此 chsh -s /bin/zsh
命令切换。
现在我们来查看以下系统支持的shell风格命令:
$ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
解决办法:
- 不使用bash,切换zsh,
chsh -s /bin/zsh
命令切换即可。 - 继续使用bash,但又不想出现提示语。
vim ~/.bash_profile
按 i 编辑.bash_profile 文件,在底部增加以下这行
export BASH_SILENCE_DEPRECATION_WARNING=1
:wq 保存退出,在运行以下指令,使.bash_profile生效
source ~/.bash_profile
然后重新打开终端命令行警示语消失。
网友评论