git - macOS Mojave:从 High Sierra 更新到 Mojave 后,活动开发者路径无效
问题描述
升级到 macOS Mojave 后,我尝试从终端运行 GIT,但它一直给我以下错误:
xcrun:错误:无效的活动开发者路径 (/Library/Developer/CommandLineTools),在 /Library/Developer/CommandLineTools/usr/bin/xcrun 处缺少 xcrun。
以前它工作正常。
解决方案
打开终端,然后运行以下命令:
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
推荐阅读
- docker - Docker 由 nginx、express、letsencrypt SSL 组成 502 Bad gateway
- docker - Vue UI 无法通过 docker-compose
- laravel - “找不到类 'App\Game\User'”即使更改了提供程序
- javascript - 构建一个忽略空格的动态正则表达式
- bash - 使用 CURL 将特殊字符作为 HTTP POST 传递
- ruby-on-rails - 无法让用户确认使用设计在生产中工作
- javascript - 在 html 中如何将 div 类内容(文本)传递给另一个类或 id?
- node.js - 如何获取对象在数组中的位置?
- angular - 同步 Angular 任务
- swift - swift函数动态应用参数