Skip to content

Instantly share code, notes, and snippets.

Embed
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
Note:
If you want to download and install Command Line tools manually, it can be downloaded from: https://developer.apple.com/download/more/
@Praveni
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.
Thanks

@123abceng
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.
https://brew.sh/

@Praveni
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.
Thanks

@SergeyRadist
Copy link

SergeyRadist commented Nov 2, 2020

You can just exec brew install script without removing it
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

@Oleh0374
Copy link

Oleh0374 commented Nov 14, 2020

Super! Thank you!

@OlaLaurene
Copy link

OlaLaurene commented Jan 11, 2021

It worked like a charm! Thank you!

@jandrodev
Copy link

jandrodev commented Feb 11, 2021

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

@bingli224
Copy link

bingli224 commented Feb 18, 2021

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

@ken1009us
Copy link

ken1009us commented Mar 2, 2021

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

@WAAkurugu
Copy link

WAAkurugu commented Mar 2, 2021

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

@HenrikVL
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.

@Raymond0728
Copy link

Raymond0728 commented Mar 3, 2021

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

@gabaudette
Copy link

gabaudette commented Mar 12, 2021

Thank you

@fabiensebban
Copy link

fabiensebban commented Mar 14, 2021

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

Thank you!

@cbloss
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 :)

@khomaldi
Copy link

khomaldi commented Mar 25, 2021

Big Sur 11.2.3
MacBook Pro 13 M1 2020

works for me. thanks!

@grace-steam
Copy link

grace-steam commented May 10, 2021

It works, thank you!

@ryanaldred11
Copy link

ryanaldred11 commented Jul 7, 2021

Thank you!

@mdbeckman
Copy link

mdbeckman commented Dec 1, 2021

Works for 12.0.1 Monterey

@connect2babu
Copy link

connect2babu commented Dec 13, 2021

thanks for the tip

@fejiofor
Copy link

fejiofor commented Jan 3, 2022

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

@carapixo
Copy link

carapixo commented Jan 10, 2022

Thank you!

@ccgarant
Copy link

ccgarant commented Jan 17, 2022

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

@LucyBurns
Copy link

LucyBurns commented Feb 28, 2022

Thanks - this worked for me too :)

@iwanttobealight
Copy link

iwanttobealight commented Apr 5, 2022

worked for me with monterey

@TWcamel
Copy link

TWcamel commented Apr 13, 2022

171hrs download time... woow

@balajinatarajan22
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.

@AaronNan24
Copy link

AaronNan24 commented Jun 24, 2022

You can just exec brew install script without removing it /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

it works for me

@dipanshukocher
Copy link

dipanshukocher commented Jun 24, 2022

You can just exec brew install script without removing it /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

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