Search code examples
xcodecommand-linehomebrew

Homebrew saying Xcode is outdated


I'm trying to perform an install of a package with Homebrew, but when I try to run the install I am getting the following error:

Error: Your Xcode (7.3.1) is outdated. Please update to Xcode 8.0 (or delete it). Xcode can be updated from the App Store.

I would like to keep Xcode 7.3.1 on this machine since I have Xcode 8 on another machine, and am using this one for older projects.

I have found a similar post on SO, but the recommended solution to set export TRAVIS=1 doesn't seem to work for me. Hoping someone has a fix or a workaround I may use. Here are some more of my specifics:

Xcode 7.3.1
Homebrew 1.0.8-135-g4284b82
macOS Sierra 10.12 (16A323)

If anything other specifics needed, please let me know.

Thanks guys!


Solution

  • 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.