`
wxb880114
  • 浏览: 679080 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Mac git xcrun: error: active developer path

阅读更多



 

Mac卸载Xcode后运行git 命令报如下异常:

重新使用brew install git 提示git 已经存在

-> git
xcrun: error: active developer path 
("/Applications/Xcode.app/Contents/Developer") 
does not exist, use `xcode-select --switch path/to/Xcode.app` 
to specify the Xcode that you wish to use for command line 
developer tools (or see `man xcode-select`)

解决办法

  1. xcode-select --install  # 单独安装CommandLineTools,不需要Xcode

  2. sudo xcode-select --switch /Library/Developer/CommandLineTools  # 指定路径

再执行 git,显示OK了。

-> git
usage: git [--version] [--help] [-C <path>] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]

 

  • 大小: 236.5 KB
分享到:
评论

相关推荐

    mac 上idea 提示 Сannot Run Git xcrun: error: invalid active developer path 解决方法

     xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun 看了下Git命令能否正常使用 命令行git –help ...

    mac git xcrun error active developer path 错误

    然而,在某些情况下,尤其是在更新或同时安装了多个Xcode版本时,用户可能会遇到“mac git xcrun error active developer path”错误。这个错误通常发生在尝试运行与Xcode相关的命令行工具,如`git`或`xcrun`时,...

    macOS Mojave Xcode命令行工具

    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun 使用xcode-select --install命令一直安装失败-_- 这...

    解决fatal:remote error:You can’t push to git://github.com/username/*.git问题的办法

    解决fatal:remote error:You can’t push to git://github.com/username/*.git问题的办法 今天Git push的时候 fatal:remote error: You can't push to git://github.com/username/*.git Use git@github....

    解决idea 拉取代码出现的 “ Сannot Run Git Cannot identify version of git executable: no response“的问题

    对于Linux和Mac用户,需要在`.bashrc`或`.zshrc`文件中添加`export PATH=$PATH:/usr/local/git/bin`(或你的实际Git安装路径),然后运行`source ~/.bashrc`或`source ~/.zshrc`使更改生效。 **步骤4:检查Git版本*...

    《git基础知识》PPT课件.ppt

    Git 基础知识 Git 是一个分布式版本控制系统,它不同于集中式版本控制系统 SVN。Git 的优势在于上传下载速度快、异地协同工作、现场版本控制、更好的提交列表、更好的差异比较、工作进度保存、作为 SVN 前端实现...

    Git命令提示行,出现错误是的处理方法

    git操作提示符,一些日常操作git提交的以及出现错误时的处理方法,很简单的一些记录

    gitlog:从 git commit 消息管理更改日志

    bin/控制台 gitlog:branch [path_to_repo] 显示 repo 的分支。 bin/控制台 gitlog:commit [path_to_repo] 显示或导出日志。 该命令支持以下参数: --limit=[(int)limit]:默认情况下它只显示/导出最后一次提交。 ...

    解决git:fatal:Unable to create”…/.git/index.lock” 的错误

    问题描述: 在使用git 进行提交时, 出现上面这个报错, 导致无法提交. 报错大致意思就是创建index.lock文件失败,因为已经存在index.lock文件了. index.lock文件是在.git下面, 而.git是一般是隐藏的, 那么可以通过以下...

    git入门:掌握版本控制的关键步骤.pdf

    - 可以直接从Git官方网站下载安装程序,建议在安装过程中勾选“Add Git to the Windows PATH”选项,以便在任何位置运行Git命令。 - **Mac用户**: - 可以通过Homebrew来安装Git: ```bash brew install git `...

    python-gitpath:一个小的python模块,使在git仓库中的工作变得更容易

    路径处理gitpath.root()返回存储库根目录的绝对路径gitpath.abspath(_rel_path_)返回相对于根目录的给定路径的绝对路径,因此假设此/home/maxnoe/python-gitpath位于/home/maxnoe/python-gitpath : import ...

    Git使用教程

    Git 使用教程 Git 是一个分布式版本控制系统,能够记录每次文件的改动,并且允许多人协作编辑。以下是 Git 使用教程的知识点总结: 一、Git 简介 * Git 是什么?Git 是目前世界上最先进的分布式版本控制系统。 *...

    git(mac/win) 两种版本.zip

    本压缩包提供了适用于Mac和Windows操作系统的Git版本,分别是git-2.15.0(Mac)和git-2.15.1.2-64bit(Windows)。以下将详细介绍这两个版本以及与它们相关的Git、GitHub和Java知识点。 1. Git:由Linus Torvalds...

    驾驭Git标签:高效管理项目依赖版本

    6. **支持多种操作系统**:Git可以在Linux、Unix、Mac和Windows等操作系统上运行。 7. **支持代码合并和代码审查**:Git支持代码合并请求(Merge Request)和代码审查,有助于提高代码质量。 Git通常与GitHub、...

    Git:Git高级特性:重写历史.docx

    Git:Git高级特性:重写历史.docx

    git2r:R绑定到libgit2库

    然后,加载包`library(git2r)`,并根据需要初始化一个Git仓库对象,如`repo &lt;- git2r::repository("path/to/your/repo")`。 在提供的压缩包文件`git2r-master`中,很可能包含了Git2r源代码的副本,你可以通过阅读和...

    IntelliJIDEA下使用Git.docx

    使用 IntelliJ IDEA 下的 Git 版本管理系统 在软件开发过程中,版本管理系统扮演着非常重要的角色。Git 是目前最流行的分布式版本管理系统,它拥有两套版本库,本地库和远程库。在这篇文章中,我们将详细介绍如何在...

    Git:Git高级特性:钩子与自定义脚本.docx

    Git:Git高级特性:钩子与自定义脚本.docx

    Git常见使用命令参考

    Git常见使用命令参考 Git是一款免费、开源的版本控制系统,是软件开发过程中的必备工具。下面是Git常见使用命令参考,涵盖了Git的基本使用方法和进阶使用技巧。 Git初始设置 在使用Git之前,需要进行初始设置,...

    GitPath:GitHub客户端

    GitPath是一款专为GitHub设计的客户端工具,它旨在提供一种更为便捷的方式来管理和操作GitHub上的项目。作为一款客户端软件,GitPath允许用户无需通过命令行界面即可执行常见的Git操作,如克隆、拉取、推送、分支...

Global site tag (gtag.js) - Google Analytics