macOS Mojave: invalid active developer path after updating to Mojave from High Sierra

前端 未结 4 1497
天命终不由人
天命终不由人 2021-02-05 23:15

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

xcrun: error: invalid active developer path (

相关标签:
4条回答
  • 2021-02-05 23:19

    when I use git in the terminal:

    ErrorImage

    then I run it:

    sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
    
    0 讨论(0)
  • 2021-02-05 23:21

    This line worked for me. I had the same issue. Run it in the terminal.

    sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
    
    0 讨论(0)
  • 2021-02-05 23:30

    This happened to me after updated XCode to 12.3

    Using the following command as root solved the issue:

    sudo xcode-select --reset
    
    0 讨论(0)
  • 2021-02-05 23:33

    Open Terminal, and run the following:

    xcode-select --install
    

    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

    0 讨论(0)
提交回复
热议问题