本文介绍了macOS Mojave:从High Sierra更新为Mojave后,无效的活动开发人员路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级到macOS Mojave后,我尝试从Terminal运行GIT,但它始终给我以下错误:

After upgrading to macOS Mojave, I tried to run GIT from Terminal but it kept giving me the following error:

以前运行正常.

推荐答案

打开终端,然后运行以下命令:

Open Terminal, and run the following:

xcode-select --install

这将下载并安装xcode开发人员工具并解决问题.问题在于,需要明确同意许可协议.作为后续步骤,如果您有多个版本,或者希望命令行工具在不使用Xcode的情况下运行,则可能需要将路径重置为Xcode.

This will download and install xcode developer tools and fix the problem. The problem is that one needs to explicitly agree to the license agreement. As a follow on step, you may need to reset the path to Xcode if you have several versions or want the command line tools to run without Xcode.

xcode-select --switch /Applications/Xcode.app

xcode-select --switch /Library/Developer/CommandLineTools

我也找到了这个问题的解决方案.

I have also found the solution in this question.

https://apple.stackexchange.com/questions/254380/macos -mojave-invalid-active-developer-path

这篇关于macOS Mojave:从High Sierra更新为Mojave后,无效的活动开发人员路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 16:50