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

走远了吗. 提交于 2019-11-28 20:26:02

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

tol4trob

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

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.

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

This did it for me.

Most likely you need to reinstall the command line tools before switching the xcode path to point there.

First install the tools

$ xcode-select --install

This will install the tools into the folder /Library/Developer/CommandLineTools.

Then point the xcode path to where the tools were installed, like this

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

Note: You can see the current xcode path with the command $ xcode-select -p. Mine was initially pointing to /Applications/Xcode.app/Contents/Developer when I was getting the error

Maybe you should install Xcode 5.0.1 for Mavericks. Check updates.

wanton

I hit this same issue running Fastlane on a fresh High Sierra installation. Solved with:

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

This worked for me, just paste in terminal: sudo xcode-select --switch /Library/Developer/CommandLineTools/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!