Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Has anyone seen this warning while installing homebrew? What does it mean? Should I be worried?

Warning: /opt/homebrew/bin is not in your PATH. enter image description here

Some background info:

I read some blogs about M1 chip and thought I would need to install Rosetta 2 on my mac in order to install homebrew.

However, before I Rosetta 2, I tried installing the plain old /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)". The went through, and I saw "Installation successful!"

The only issue is that I saw the following warning.

homebrew Warning: /opt/homebrew/bin is not in your PATH.

Should I be worried? What does it mean?

like image 327
Jun Yin Avatar asked Dec 29 '20 04:12

Jun Yin


People also ask

Does Homebrew work on M1 Macs?

If you're coming to M1 Mac fresh, without any old projects or profiles, you probably won't notice; Homebrew will work as it always has. But if you're trying to migrate from an Intel Mac you won't be able to just move packages that were once in /usr/local over to /opt/homebrew .

Does Homebrew work on macOS Big Sur?

The easiest way to install a number of Unix style applications and open source software onto macOS Monterey, Big Sur, Catalina, Mojave and earlier Sierra OS versions is via a package manager, unfortunately, macOS Monterey doesn't come with one, but fortunately, some good folks care, they come in the form of Homebrew.


2 Answers

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.

like image 153
XavierB Avatar answered Oct 31 '22 05:10

XavierB


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.

like image 45
Jango Avatar answered Oct 31 '22 06:10

Jango