Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command Line Tools bash (git) not working - macOS Sierra final release candidate

I have just upgraded from OS X 10.11 "El Capitan" to 10.12: "Sierra", and when I try to access git commands inside a terminal, I get the following error:

xcrun: error: invalid active developer path

(/Library/Developer/CommandLineTools), missing xcrun at:

/Library/Developer/CommandLineTools/usr/bin/xcrun

Please help me if anyone have solution.

like image 725
Sanket Prabhu Avatar asked Sep 14 '16 06:09

Sanket Prabhu


People also ask

How do I run Gitbash on Mac?

Go to Programs > Git and select Git Bash . We'll refer to both Mac's Terminal and Window's Git Bash as just Bash. You should have been returned a line with the version number, this means that git was correctly installed and is up and running!

How do I know if Git is installed on Mac terminal?

Install Git on MacOpen the command prompt "terminal" and type git version to verify Git was installed.


2 Answers

Re-install Xcode developer tools

xcode-select --install 
like image 189
Parag Bafna Avatar answered Oct 02 '22 06:10

Parag Bafna


I fixed this issue by downloading and installing the 'Command Line Tools (macOS sierra) for Xcode 8' package from Apple Developer Downloads.

Be sure to select Command Line Tools (macOS 10.12) for Xcode 8 and not the one for 8.1 beta unless you have Xcode 8.1 beta installed.

like image 27
Richard Wheatley Avatar answered Oct 02 '22 06:10

Richard Wheatley