Getting a warning when installing homebrew on MacOS Big Sur (M1 chip)

I also have the same issue today, on Mac OS Big Sur (with M1 chip). After installing from Homebrew homepage.

/bin/bash -c "$(curl -fsSL"

To resolve, you can do :

Edit your ~/.bashrc with at the end of file :

export PATH=/opt/homebrew/bin:$PATH

To edit

vi .bashrc

if bashrc not found

touch ~/.bashrc

and paste

export PATH=/opt/homebrew/bin:$PATH 

in the file then save and quit the file and then reload bash or

source ~/.bashrc

and you're good to go.

I had the same issue today, on Mac OS Big Sur (with M1 chip). The problem is indicated in the warning : Warning: /opt/homebrew/bin is not in your PATH. It seems that it is the directory where the binaries of hombrew are put. To resolve, you can do :

  1. Edit your ~/.zshrc or ~/.bashrc with at the end of file:
export PATH=/opt/homebrew/bin:$PATH

After this, tap source ~/.zshrc in your terminal or restart it.

For more infos about the current status of Homebrew on Mac with a M1 chip : Apple Silicon support in Homebrew

Edit : As mentioned by @kangkyu in this comment, Homebrew is changing to version 3.0.0 which supports officially Apple Silicon. If you have a prior version just brew update.

How To Set Up Your Mac for Homebrew

Step 1

Check you have already Install the Xcode. Run the below command in your terminal

/usr/bin/xcodebuild -version

It will print the below sample output Xcode 12.3 Build version 12C33

Step 2

Now Open Xcode Select preferences Select location tab Now in command Line Tool select your Xcode version from dropdown menu

Step 3

In terminal run below command

/bin/bash -c "$(curl -fsSL"

Note : if you have M1 Chip Mac run the below command, close terminal and open the terminal again

echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc

Massage After homebrew installation

I have this warning too, but if you look at the "Next steps" and run those two lines, then you would be fine.