Background
After upgrading the MAC system, using git clone and other related commands on the terminal fails with an error
xcrun:error:invalid active developer path(/Library/Developer/CommandLineTools),missing xcrun at:/Library/Developer/CommandLineTools/usr/bin/xcrun
Troubleshooting
1. Check whether git has been installed
# command
which git
# outcome
/usr/local/bin/git
Description git has been installed
2. View git help information
git --help
Error reporting is the same as above:
xcrun:error:invalid active developer path(/Library/Developer/CommandLineTools),missing xcrun at:/Library/Developer/CommandLineTools/usr/bin/xcrun
to sum up, GIT has been installed, but the GIT command cannot be used normally. It may be that the GIT installation package is damaged, so reinstall git
3. Reinstall Git
brew install git
The following error messages appear during installation:
Error: The following formula:
git
cannot be installed as a binary package and must be built from source.
Install the Command Line Tools:
xcode-select --install
Error: Git must be installed and in your PATH!
Error: The following formula:
git
cannot be installed as a binary package and must be built from source.
Install the Command Line Tools:
xcode-select --install
according to the prompt, you need to reinstall xcode-select
Solution: install xcode-select
To sum up, we need to reinstall xcode-select and execute the following commands on the terminal
xcode-select --install
After installation, perform the following:
git --help
The correct output of information indicates that git has returned to normal and can be used
Read More:
- Support annot run git xcrun: error: invalid active developer path
- MacOS Catalina (system): xcrun: error: invalid active developer path(), missing xcrun at / Library
- Install homebrew xcode-select error invalid developer directory ‘/Library/Developer/CommandLineTools’
- Mac ports installation software prompts “warning: xcodebuild exists but failed to execute”
- Upload Appstore error itms-90725
- Unable to find utility “instruments”, not a developer tool or in PATH
- Install Python package under MacOS: “error: Command ‘GCC’ failed with exit status 1”
- How to Use Apt get Command Under Mac OSX
- Import any QT binding error during installation of evo
- [How to Fix] MySQL Workbench for Mac Flashback
- On the problem of from PIL import image
- [solution] MAC: stack error: ` gyp ‘failed with exit code:1
- What about ibtool failed with exit code 255? processing method
- Phpstrom reported an error when using SVN: CreateProcess error = 2, the system could not find a solution for the specified file
- Does flutter report an error after upgrading 2.5?
- The app failed to start because there is no Qt platform to initialize
- RuntimeError – [Xcodeproj] Unknown object version.
- R language error:‘ namespace:lazyeval There is no exit_ The object is eval
- Installing R’s “mvtnorm” package in Windows system: solving the problem of the R package “mvtnorm” is not installed
- IOS automation: error dyld in Xcode compilation_ shared_ cache_ extract_ Dylibs failed — the solution is as follows