Homebrew cannot run C compiled programs

I can’t resist the temptation to upgrade my Mac to 10.11, but several tragedies happened, such as:

  • Proxifier - could not initialize Proxifier kext ( I already sent an email to the author, and replied that they are working to find a real reason of this error.)
  • istat menus - I never see it again, but can’t watching the network traffic which seems not a big deal
  • cleanmymac - I download the newest version as it guided and sadly found that they are the same version

but brew - configure: error: cannot run C compiled programs.

so, brew doctor , it shows:

Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.

Warning: Your Xcode (6.3.2) is outdated
Please update to Xcode 7.0.
Xcode can be updated from the App Store.

Then setup my Xcode-beta as the system default Xcode

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

:)

Buy Mage a coffee here 😉