Error when trying to install Homebrew

errorhomebrew

I have a MacBook Air 11 (mid 2013), with OS X 10.8.5, and I want to install Homebrew, so I go to the site and copy and paste the following code in my terminal:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

The thing is, I get the following error:

enter image description here

Question: What can I do to fix it?

Best Answer

homebrew requires additional installs before you can proceed: either Xcode or Xcode Command Line Tools.

You can download Xcode (2.1 GB) via App Store.app or the Command Line Tools at developer.apple.com. Both require a valid Apple ID.

The latest CLT release is: Command Line Tools (OS X Mountain Lion) for Xcode April 2014 direct link (~115 MB).


In later system versions you can open Terminal.app and enter xcode-select --install or just gcc to install the necessary tools. You will be asked to either Get Xcode or Install. Choosing Install will download and install the command line tools only.