Homebrew saying Xcode is outdated

  1. according to https://github.com/Homebrew/brew/issues/4957 outdated home-brew could cause this problem, brew update-reset fix it.

  2. if step 1 does not work, reinstall homebrew with /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


Just do as this

Open the file /usr/local/Homebrew/Library/Homebrew/extend/os/mac/diagnostic.rb ,

then delete this line check_xcode_minimum_version in the following function.

def fatal_build_from_source_checks
    %w[
      check_xcode_license_approved
      check_xcode_minimum_version
      check_clt_minimum_version
      check_if_xcode_needs_clt_installed
    ].freeze
    end

Then brew install works fine.


So as @NicolasMiari mentioned in a comment above, the fix to my issue ended up having to have both Xcode 7 and Xcode 8 on my machine. I went on the apple developer site, downloaded Xcode 8, saved it to my documents and then used:

sudo xcode-select -switch ~/Documents/Xcode.app/

and then ran my brew install which worked as expected. Afterwards I ran:

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

to switch back to Xcode 7.3.1.

Hope this helps someone else, and thanks for the suggestions.