Skip to content

Instantly share code, notes, and snippets.

@gaquino
Last active April 15, 2024 06:52
Show Gist options
  • Save gaquino/87bdf0e6e852e445c0489379d3e9732a to your computer and use it in GitHub Desktop.
Save gaquino/87bdf0e6e852e445c0489379d3e9732a to your computer and use it in GitHub Desktop.
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/
@khomaldi
Copy link

Big Sur 11.2.3
MacBook Pro 13 M1 2020

works for me. thanks!

@grace-steam
Copy link

It works, thank you!

@ryanaldred11
Copy link

Thank you!

@mdbeckman
Copy link

Works for 12.0.1 Monterey

@connect2babu
Copy link

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

Thank you!

@ccgarant
Copy link

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

@LucyBurns
Copy link

Thanks - this worked for me too :)

@dmorenogogoleva
Copy link

worked for me with monterey

@TWcamel
Copy link

TWcamel commented Apr 13, 2022

171hrs download time... woow

@balajinatarajan22
Copy link

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

@AaronNan24
Copy link

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

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 !

@alexandervantrijffel
Copy link

Thanks for sharing, this worked well!

@utkuozbudak
Copy link

Worked in MacBook Pro 2017 Monterey OS 12.6, thanks.

@hgrourou
Copy link

perfect, thanks

@paabloLC
Copy link

Wops! That's awesome! Same error with M1, Macbook Pro 2021, Ventura OS.

@Tanaphat-Macx
Copy link

nice, thank

@therakeshm
Copy link

I had the same problem while upgrading to macOS Ventura, and that solved the issue.
Thanks 🥳

@abhishek3100
Copy link

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 !

This worked for me on my MacBook Pro M1 [ Ventura update ]

@LucasZNK
Copy link

Works on Macbook Pro M1 Pro. MacOS Ventura 13.0.1 with this extra command after the one here

sudo xcode-select --switch /Library/Developer/CommandLineTools/

@nery-alan
Copy link

Macbook M2 Ventura - works fine!

@ValterAlmeida
Copy link

Great! Thank you!

@as49049
Copy link

as49049 commented Jan 14, 2023

Thanks - That works!

@hafeezali
Copy link

Thanks!

@semperprimum
Copy link

Thanks!

@kabaluyot
Copy link

@dheerajmpai
Copy link

Same issue again after the Sonoma Update.

@wanglala5131
Copy link

It works for me, thank you!
Macbook Pro, 13-inch, M1 2020
Sonoma 14.4

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