Tag Archives: Mac Install brew Error

[Solved] Mac Install brew Error: “Warning: /opt/homebrew/bin is not in your PATH.”

Because the previous computer spilled spicy hot soup when looking at the code, I humbly changed the computer, resulting in all configurations needing to be reinstalled. Mongodb needs to be installed just at the beginning of the class. Because laziness is the first productivity, I intend to brew to complete the installation, so I have this blog post.

Error content

First, execute the command to install brew on MAC: (see the official website for the latest installation command: https://brew.sh/)

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

After entering, an error will be reported:

Error reporting reason

Missing environment variable.

Solution:

According to the error command, set the environment variable: export path =/opt/homebrew/bin: $path . (my error is /opt/homebrew/bin , so I add this and don’t copy this command directly)

Re execute /bin/bash - C "$(curl - fssl https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh )" command.