Git is not working after macOS Mojave Update (xcru

2019-01-16 03:00发布

Last night i updated to macOS Mojave,

This morning I navigated to my work's code base in Command line on my MacBook pro,

typed in "git status" in the repo and received the error:

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

8条回答
We Are One
2楼-- · 2019-01-16 03:38

In addition to dustbuster's answer I needed to set path to the Xcode folder with this command:

sudo xcode-select -switch /Library/Developer/CommandLineTools
查看更多
倾城 Initia
3楼-- · 2019-01-16 03:46

if you dont have xcode or setup manually without xcode.

  1. sudo rm -rf /Library/Developer/CommandLineTools
  2. https://developer.apple.com/download/more/ and downloading Command Line Tools (macOS 10.14) for Xcode 10 and then installing it manually.
  3. Setup Command Line Tools

Take it be easy

else

  1. xcode-select --install . enough this.
查看更多
登录 后发表回答