You have to install Homebrew and Xcode command-line tools
I installed X-code Directly from Appstore
xcode-select --install # I haven't tested this method but this should also work if you don't like installing from Appstore
To Install homebrew copy...