Brew Xcode



I have macOS Mojave version 10.14.5 installed with Xcode version 10.2.1 and Command Line Tools installed using xcode-select -install. All problem started when I tried to install youtube-dl formula. As I understand, Xcode command line tools can be installed without installing Xcode. Also, from my previous experience, if the command line tools aren't installed separately from Xcode (by running xcode-select -install), they are not detected by Homebrew, i.e. When running brew config, the value for CLT: is shown as N/A.

Sometimes you want to install software that is typically categorized as F/OSS(Free, or Open Source Software).

Homebrew is a packaging system for OS X whichmakes installing (and keeping them updated) many of these bits of software easy.

Install Xcode

To start with, we need to install the Xcode tools. Its not necessary toinstall all of Xcode to do this. We can simply run:

Install homebrew

Now that we have Xcode tools installed, we can install homebrew. Start bylooking at the web page: http://brew.sh

When you’re ready, open up Terminal.app and paste in the following (thisassumes you are using a bourne shell derivitive. If not, you will needto modifiy as appropriate):

Homebrew installs a bunch of files into ‘/usr/local’ and its intended to berun as a regular user (with the implication that ‘/usr/local’ needs to beowned and writable by said regular user.

Brew update

The first thing you should know how to do is update the brew repository.

This will reach out to github and pull down the current version of thehomebrew repository, containing all the recipies for packages you may want touse.

Brew install example

Plugins for quickbooks for mac. Now that you have homebrew installed, you can use it to install software. Forexample, I like to install the ‘mtr’ package instead of using the traditionaltraceroute. The install process looks like this:

The output from running ‘sudo mtr -c 1 google.com’ might look like:

If you don’t want to have to call mtr with sudo, you can do the following:

You will probably have to substitute a newer version for the ‘0.86’. After yourun these commands, you should be able to execute mtr with out using sudo.

Brew search

Now, you can go use brew to install other software. Search the list ofavailable packages with

If you don’t specify a name or an expression ‘/expression/’, it will dump allthat is available.

Brew xcodebuild

Once you’ve selected the package you wish to install, you can

Brew upgrade (all)

Brew

Lastly, you should know how to upgrade packages you’ve installed. Presumingyou’ve already run a ‘brew update’ (discussed above), you should run

This will look through all of the packages you have installed, compare it tothe current list (this information was fetched when you ran ‘brew update’),and then it will upgrade any packages that are out of date.

My 2016 MacBook Pro has been sitting around ignored of late. My primary work laptop has been an Acer Predator for the last year. With the production release of Big Sur, I decided to upgrade the OS the day of release. This weekend, I tried to upgrade HomeBrew and everything it had installed, but quickly ran into a big issue with the Command Line Tools (CLT) being out of date.

Brew XcodeBrew install xcode

For those that are unfamiliar, Homebrew is “The Missing Package Manager for macOS”. Installing software that it supports is easy and it’s considered a must-have if you’re developing on macOS.

brew install <package>

Upgrading Homebrew and its packages can be done just as easily: 5 more years....

brew upgrade

but running this on Big Sur, with the latest version of Xcode (12.2) installed via the App Store will throw this error:

Your CLT does not support macOS 11.0

Xcode Beta

Log into Apple’s Developer Site and download the beta of Xcode, version 12.3 as of this writing. It’s an 11.5 GB ZIP file, which will take time to download. It also took at least 30 minutes to unzip on my machine and I have an SSD. Don’t just drop it into your Applicaitons folder, you’ll need to completely remove your existing install of Xcode from the app store. Take a look at this article for details. I don’t use Xcode other than for the CLT, so be careful and make backups before you start deleting things.

Once you’ve removed the version from the app store, drag the unzipped Xcode Beta into your Applications folder and run it. You’ll have to accept the license agreement to proceed. Once it’s up and running, run your Homebrew upgrade again.

Updated Command Line Tools

I immediately got the same message as before. Installing this beta was reported on multiple sites to have addressed the problem, but for me it didn’t. I forgot that there was command to specially check for issues with Homebrew:

brew doctor

Among others were these messages:

Running the softwareupdate command found nothing to install. So I followed the next pair of instructions:

Since these commands start with sudo, you’ll need to enter your user password so they’ll run. Another download began and the upgraded Command Line Tools were finally installed. If this doesn’t work for some reason, go to More Downloads for Apple Developers where you can download the DMG for “Command Line Tools for Xcode 12.3 beta” (430 MB). I’m not sure if you can run that without the main Xcode beta installed, but it’s worth a try in order to avoid the other large download. If anyone is able to run that without the main beta, please let me know.

Third Time’s the Charm

And finally,

And there was much rejoicing! And I was finally able to start writing a new blog post.

Or so I thought.

Because updated software always runs perfectly the first time.

Brew Upgrade Xcode

Xcode

Brew Xcode

Shyeah, right. (Jekyll, I’m looking at you.)

Brew Xcode Outdated

Homebrew and Apple Silicon

If you’re experiencing any other issues with Homebrew, check their Github account before freaking out. Not everything is currently supported on Big Sur, but they’re working on it. The other massive project in progress is supporting Apple Silicon. Take a look at macOS 11.0 Big Sur compatibility on Apple Silicon for more information.

Brew Xcodegen

And if you can spare something, make a donation. They deserve it.