天天看點

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