Git Of Mac
Start
February 19, 2023
End
February 19, 2023
Period
1Days
PIC
Last Updated
February 19, 2023
How to Fix the Error: xcrun: error: invalid active developer path When Running a Git Command
- This error may occur when running a git command:
% git init
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Install Command Line Developer Tools Using xcode-select
xcode-select --install
- This issue often occurs after a macOS upgrade, which may remove the Xcode Command Line Tools.
What is xcode-select?
xcode-select is a command used to manage the active developer directory for Xcode and BSD tools.
- You can switch the active developer directory using the -switch option:
xcode-select -switch <path to developer tools>
- To check the currently active path:
xcode-select -print-path