Getting error message:
Can’t find Xcode install for metal compiler. Please install Xcode and run Xcode.app to accept license or ensure active developer directory is set to current installation using “xcode-select”
So I tried the most recommended fix terminal ⟶ sudo xcodebuild -license
Error message ⟶
xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance
So search the error message and the most common fix was to reinstall ⟶
xcode-select --install
Error message ⟶
xcode-select: note: Command line tools are already installed. Use “Software Update” in System Settings or the software update command line interface to install updates
Everyone had some of sort fix, but it they were wrong.
!!! The real solution !!!
-
Go into Xcode.app and select [Xcode] in the top left corner
-
Select [Accounts] and manage your [Certificates]
-
Next select [Locations] and review you dev path:
Correct ⟶ [Users/“your name”/Library/Developer -
Still in [Locations] select [Command Line Tools] choose yours; for instance:
⟶ Xcode 14 (#####)- You should see the label underneath showing : “/Applications/Xcode.app”
The reason for the error message:
xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance
Solution: Select [Command Line Tools] to choose the instance from the drop down widget ⟶ Xcode [v#] (#####)
So if you find yourself getting the same error this might be your solution.