打开ITerm终端出现[oh-my-zsh] Can't update: not a git repository是怎么回事?

4,833 阅读1分钟

场景:macOs更新系统(Monterey)后,使用iterm2出现此类问题。

解决方法:

cd ~/.oh-my-zsh
git init

此时出现: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

此为更新系统导致xcode插件缺失出现的问题。安装下xcode相关插件即可

xcode-select --install

等待安装完成。oh-my-zsh即可正常更新。