liuhaotian
V2EX  ›  问与答

卸载 Xcode 后无法安装 Command Line Developer Tools

  •  
  •   liuhaotian · Feb 3, 2016 · 5041 views
    This topic created in 3946 days ago, the information mentioned may be changed or developed.

    在 Terminal 运行 git init 出现如下错误提示,并且询问是否安装 Xcode 。

    xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
    

    我的理解是:我之前使用的是 Xcode 自带的 CMD Tools 但是现在卸载了之后显然不存在 Xcode.app 这个路径了,所以不管怎么样安装系统都找不到正确的 CMD Tools 的路径。请问这应该在哪里修改 / 如何处理?
    谢谢!

    2 replies  •  2016-02-03 17:23:13 +08:00
    Busy
    Busy
    Feb 3, 2016
    1
    xcode-select --install 无法安装 command line tools ?

    xcode-select -s 可以切换路径
    xcode-select -p 看下你目前的工具路径,按理,卸载 xcode 后路径变量回刷新的

    具体用法 man xcode-select

    PS: 没经过测试
    liuhaotian
    liuhaotian
    OP
    Feb 3, 2016
    2
    @Havee 谢谢 我去试了一下 找不到最新的路径变量 打算找一个没有安装过 Xcode 的朋友看看他的路径是什么。
    另外执行了 xcode-select -r 发现默认路径就是 Xcode 的安装路径。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4527 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 03:44 · PVG 11:44 · LAX 19:44 · JFK 22:44
    ♥ Do have faith in what you're doing.