Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then run the following command to ensure that there aren’t any potential problems with your environment. Some warnings (if any) are informational and not necessary actionable; it’s just a good idea to at least read through and see if anything looks out of the ordinary.
brew doctor
The following command will update to the latest version of Homebrew and its formulae: