Having Homebrew install issues on Mac OSX

This forum holds the documentation for Automate Package Manager. It should not be used to post issues or feature request.
Locked
User avatar
Cubert
Posts: 2549
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Having Homebrew install issues on Mac OSX

Post by Cubert »

Your Mac never reports any data after enabling it. No brew version numbers get reported in agent EDFs for Package Manager version.

A common issue with the install of Homebrew through automation may cause Homebrew to fail install. Homebrew requires xcode commandline tools to be installed prior to Homebrew install.

We attempt to install the xcode tools for you but it is subject to failure and here is why. The tools require user acceptance during the install process which during an automated install is not there. There is a trick to backdoor this install by testing for an available update in the agents available update.

You can create a tmp file denoting that the commandline tools are on-demand and install is in progress. Then we have to see if the update to tool is available for this system, and here is where it fails. Not all systems will show an available update.

We use the following to capture the update if available:

Code: Select all

/usr/sbin/softwareupdate -l | grep -B 1 -E 'Command Line Tools' | awk -F'*' '/^ *\\*/ {print \$2}' | sed -e 's/^ *Label: //' -e 's/^ *// | sort -V | tail -n1 
This should return the title of the update available if one. If not then you will need to manually install xcode commandline tools by running the following sequence.


To install Xcode Command Line Tools on a Mac, you can use the following steps:

Open Terminal on Mac:

You can find Terminal in the Applications > Utilities folder or use Spotlight (Cmd + Space) and type "Terminal" to open it.
Run the following command:

Code

Code: Select all

xcode-select --install

A pop-up window will appear:

After running the command, a pop-up window will appear asking if you want to install the command line developer tools. Click "Install."
Follow the on-screen instructions:

The installer will guide you through the installation process. This may involve accepting the license agreement and entering your administrator password.
Wait for the installation to complete:

The installation process may take some time, depending on your internet connection speed.
Verify the installation:

Once the installation is complete, you can verify that the Xcode Command Line Tools are installed by running the following command in the Terminal:

Code

Code: Select all

xcode-select -p
If the tools are installed, you should see the path to the Xcode Command Line Tools.

That's it! You've successfully installed Xcode Command Line Tools on your Mac. These tools are essential for various development tasks and are required for compiling and building software on macOS.

Locked

Return to “Documentation”