Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git error "unable to locate xcodebuild" after a fresh OS X Mavericks upgrade

When I try to run previously working git commands, I get this:

dyld: Symbol not found: _sqlite3_intarray_bind
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
  Expected in: /opt/local/lib/libsqlite3.dylib
 in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
git: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
git: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch

How can I fix this?

like image 986
tol4trob Avatar asked Oct 29 '13 00:10

tol4trob


4 Answers

This works for me sudo xcode-select --switch /Library/Developer/CommandLineTools/

like image 197
sushilprj Avatar answered Oct 09 '22 08:10

sushilprj


After a much googling and confusion, the following steps lead to a solution (with Xcode installed). Some might be optional, so please feel free to elaborate on this as I am not an expert on these errors.

  • download mavericks command line tools https://developer.apple.com/downloads/
  • xcode-select --install
  • sudo xcode-select -switch /Library/Developer/CommandLineTools
  • brew install sqlite3
  • commented out DYLD_LIBRARY_PATH entry in my .bashrc file
like image 28
tol4trob Avatar answered Oct 09 '22 07:10

tol4trob


On MacOS Mojave this worked for me (git 2.21.0):

xcode-select --install
sudo xcode-select -switch /Library/Developer/CommandLineTools
like image 30
theandrewlane Avatar answered Oct 09 '22 08:10

theandrewlane


If you have already installed Xcode, you can run the following command to determine and point to the correct location

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

Or use AppStore to install latest Xcode.

like image 32
zdk Avatar answered Oct 09 '22 07:10

zdk