Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

xcode-select: Failed to locate 'clang'

When I try to run the clang command, I get the following error:

xcode-select: Failed to locate 'clang', requesting installation of command line developer tools.

And then I’m getting this error:

The "clang" command requires the command line developer tools. Would
you like to install the tools now?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

If I click "Install", I continue getting the same error.

I have tried: xcode-select --install

But that gives the following error:

xcode-select: error: command line tools are already installed, use
"Software Update" to install updates

My computer is an Apple M1, Monterey 12.5.

How can I install clang?

>Solution :

Ensure Xcode packages are up-to-date. Try running xcodebuild -runFirstLaunch.

Also, you can try opening Xcode after the update and accepting the prompt to load essential development tools.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading