macOS Mojave:从High Sierra更新为Mojave后,无效的活动开发人员路径 [英] macOS Mojave: invalid active developer path after updating to Mojave from High Sierra

查看:137
本文介绍了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:

xcrun:错误:无效的活动开发人员路径(/Library/Developer/CommandLineTools),缺少xcrun,位于:/Library/Developer/CommandLineTools/usr/bin/xcrun.

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun.

以前运行正常.

推荐答案

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

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后,无效的活动开发人员路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆