Mac – Update Xcode from 4.6.1 to 4.6.3 for Homebrew

command linemac-appstoresoftware-updatexcode

I have installed Xode downloading the DMG (not from the Mac App Store). Now each time I run brew doctor it says:

Your Xcode (4.6.1) is outdated
Please install Xcode 4.6.3.

But In App Store > Available Updates.. it does not appear. How can I upgrade it?

Please note that I'm not using Xcode but Xcode command-line tools (the C++ compiler) and if possible I would like to avoid reinstalling it.

Best Answer

I have just found this on GitHub Gists.

Try enter the following command in Terminal:

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

Solved my brew doctor problem of Homebrew not recognising updated version of Xcode.

Also see this Homebrew compatibility guide and ensure that your OS is compatible with Command Line Tools on their own or if you need the full version of Xcode.