Git Of Mac

Contains information related to the Mac

Completed High
Start
February 19, 2023
End
February 19, 2023
Period
1Days
Last Updated
February 19, 2023
Tags

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

Reference URL