升级到macOS Mojave后,我尝试从Terminal运行GIT,但它始终给我以下错误:
xcrun:错误:无效的活动开发人员路径(/ Library / Developer / CommandLineTools),缺少xcrun,位于:/ Library / Developer / CommandLineTools / usr / bin / xcrun。
以前运行正常。
答案 0 :(得分:14)
打开终端,然后运行以下命令:
xcode-select --install
这将下载并安装xcode开发人员工具并解决问题。问题在于,需要明确同意许可协议。作为后续步骤,如果您有多个版本,或者希望命令行工具在没有Xcode的情况下运行,则可能需要将Xcode的路径重置。
xcode-select --switch /Applications/Xcode.app
xcode-select --switch /Library/Developer/CommandLineTools
我也找到了这个问题的解决方法。
https://apple.stackexchange.com/questions/254380/macos-mojave-invalid-active-developer-path
答案 1 :(得分:0)
这条线对我有用。我遇到过同样的问题。在终端中运行它。
<ResourceDictionary>
答案 2 :(得分:0)
当我在终端中使用git时:
然后我运行它:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer