Mac-关于升级macOS Catalina后,终端试用问题

xcrun: error

在终端输入 git clone *****后,提示:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing*****,解决方法,直接在终端输入以下即可:

xcode-select --install

shell 脚本问题

如果每次打开终端都提示:

The default interactive shell is now zsh.

To update your account to use zsh, please run `chsh -s /bin/zsh`.

原因是原本使用的是bash风格,提示语告知现在新系统的shell已经更换为zsh,请用此 `chsh -s /bin/zsh` 命令切换。

解决办法:

(1) 不使用bash,切换zsh,`chsh -s /bin/zsh`命令切换即可。

(2) 继续使用bash,但又不想出现提示语,则打开文件:

vim ~/.bash_profile

.bash_profile文件最下方加上:

# macOS Catalina
export BASH_SILENCE_DEPRECATION_WARNING=1

然后ESC  :wq 保存退出,重新打开命令行警示语消失。

 

相关引用:https://www.cnblogs.com/KuJo/p/11643142.html

posted @ 2019-11-12 10:06  macroK  阅读(6991)  评论(2编辑  收藏  举报