Skip installation of Command Line Tools when installing Homebrew on macos

Thomas.maher picture Thomas.maher · Jul 18, 2018 · Viewed 12.6k times · Source

I am installing homebrew on macOS High Sierra 10.13. I have already installed the Command Line Tools for Xcode which is a requirement for homebrew. When installation of homebrew starts I am forced to install command line tools (or abort). When I do this the installation process hangs. I don't understand why this hangs but more importantly I don't understand why it is trying to install CLT when I can show that they are already available on my machine.

Answer

ma11hew28 picture ma11hew28 · Sep 2, 2018
  1. Right click the link below and save it as homebrew-install.sh
    https://raw.githubusercontent.com/Homebrew/install/master/install.sh

  2. Open homebrew-install.sh with a text editor and change the definition of the method should_install_command_line_tools to return 1

  3. Make homebrew-install.sh executable (by running chmod u+x homebrew-install.sh) and then run ./homebrew-install.sh