I’ve been playing with OSX El Capitan Developer Preview for the past few days, and aside from a few little problems, it’s been great so far. The sticking point was homebrew and installing new packages.
I was trying to install PHP 5.4 on my local machine, and kept getting the following error:
checking whether we are cross compiling... configure: error: in
/private/tmp/xz20150712-4864-11g36o9/xz-5.2.1': configure: error: cannot run C compiled programs. If you meant to cross compile, use --host'. See `config.log' for more details
Fixing the issue
I did the usual of googling for a solution, and the suggestions I came across were to do with the file system. I knew nothing had changed here, so kept digging and looking for a solution.
After running brew doctor, it moaned about xCode being out of date. As the issue was to do with C compiled programs not running, I assumed that the issue was related to xCode. I ran:
After waiting for the installer to finish, everything ran smoothly with installing PHP with homebrew. Hope this helps you save time and effort!