Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
MacOS (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools))
If you are facing an error like that on new MacOS version.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
It means that you need to install XCode command line, open a Terminal and run this command:
$ xcode-select --install
If you want to download and install Command Line tools manually, it can be downloaded from:
Copy link

Praveni commented Sep 20, 2020

It didn't work for me. Says not available from the software update server. Please let me know what can I do.

Copy link

123abceng commented Oct 3, 2020

The same shit. "Not available from the software update server."
Screen Shot 2020-10-03 at 12 25 55 PM

but the better way is reinstall brew, and after that it'll automatically instal all xcode command line packages.

Copy link

Praveni commented Oct 5, 2020

Hello @123abceng, I was getting the same error in the beginning and then I figured out that when this message pops up it means that the server is already updated and that the xcrun or xcode is already installed. So, I have deleted all the xcrun and xcode files from my system and then directly pasted this xcode command in my terminal. And it worked. I hope it works for you too.

Copy link

SergeyRadist commented Nov 2, 2020

You can just exec brew install script without removing it
/bin/bash -c "$(curl -fsSL"

Copy link

Oleh0374 commented Nov 14, 2020

Super! Thank you!

Copy link

OlaLaurene commented Jan 11, 2021

It worked like a charm! Thank you!

Copy link

jandrodev commented Feb 11, 2021

It worked on a MacBook Pro 2020 with MacOS Big Sur 11.2.1. Thanks !!

Copy link

bingli224 commented Feb 18, 2021

It works on my Mac min (M1, 2020). Thanks.

Copy link

ken1009us commented Mar 2, 2021

It worked on a Macbook Pro 2017 with MacOS Big Sur 11.2.2.
Many thanks.

Copy link

WAAkurugu commented Mar 2, 2021

Worked for me: MacOS Big Sur 11.2.1.
Thank you!

Copy link

HenrikVL commented Mar 3, 2021

This worked!
Updated my M1 Macbook Pro to Big Sur 11.2.2 and had this problem.
I ran the following in my terminal:

xcode-select --install 

This fixed the issue.

Copy link

Raymond0728 commented Mar 3, 2021

Works for me, thanks a lot.
macOS Big Sur 11.2.2
MacBook Pro 2019

Copy link

gabaudette commented Mar 12, 2021

Thank you

Copy link

fabiensebban commented Mar 14, 2021

Upgraded my mac book pro from High Sierra to Big Sur. Works fine for me.

Thank you!

Copy link

cbloss commented Mar 15, 2021

I have to run the xcode-select --install with each Big Sur update. Does anyone else run into this too??

Copy link

ghost commented Mar 16, 2021

Thank you :)

Copy link

khomaldi commented Mar 25, 2021

Big Sur 11.2.3
MacBook Pro 13 M1 2020

works for me. thanks!

Copy link

grace-steam commented May 10, 2021

It works, thank you!

Copy link

ryanaldred11 commented Jul 7, 2021

Thank you!

Copy link

mdbeckman commented Dec 1, 2021

Works for 12.0.1 Monterey

Copy link

connect2babu commented Dec 13, 2021

thanks for the tip

Copy link

fejiofor commented Jan 3, 2022

it did not work for me. What should i do?

Copy link

carapixo commented Jan 10, 2022

Thank you!

Copy link

ccgarant commented Jan 17, 2022

Thank you! Worked for me. Macbook Pro 2015, Monterey, Quad Intel i7

Copy link

LucyBurns commented Feb 28, 2022

Thanks - this worked for me too :)

Copy link

iwanttobealight commented Apr 5, 2022

worked for me with monterey

Copy link

TWcamel commented Apr 13, 2022

171hrs download time... woow

Copy link

balajinatarajan22 commented May 19, 2022

FYI: it says 200+ hours 300+ or even 400+ but it got completed in less than an hour.

Copy link

AaronNan24 commented Jun 24, 2022

You can just exec brew install script without removing it /bin/bash -c "$(curl -fsSL"

it works for me

Copy link

dipanshukocher commented Jun 24, 2022

You can just exec brew install script without removing it /bin/bash -c "$(curl -fsSL"

this worked for macbook pro os montery 12.4, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment