Skip to content

M2 How to install homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

if happen the following

git: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find git 2> /dev/null' failed with exit code 34304: (null) (errno=Invalid argument)
xcode-select: Failed to locate 'git', requesting installation of command line developer tools.
Failed during: git init -q

sudo xcode-select --switch /Library/Developer/CommandLineTools/ first then download again

if you have problem with:

Screen Shot 2022-10-13 at 08.43.05

Then have do something first. Setting the PATH

if you are bash then vi ~/.bashrc

If you are zsh then vi ~/.zprofile to access the z-shell, in this file add export PATH="/opt/homebrew/bin:$PATH" then save them (esc +:+wq! )

Now we have to implement the changes run source ~/.zprofile

and then print by echo $PATH. Then you download again.