How to modify PATH for Homebrew?
open your /etc/paths file, put /usr/local/bin on top of /usr/bin
$ sudo vi /etc/paths
and Restart the terminal, @mmel
How can I permanently add Homebrew to my PATH?
~/.zshrc file and add this line to it:
Installing homebrew and getting the PATH correct (permanently)
Can you type this on the terminal?
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
The re-installation should fix the PATH.
Cannot update PATH to accommodate Homebrew commands
By running /opt/homebrew/bin/brew doctor as noted in the warning as opposed to brew doctor I was given the correct notation for updating my .zshrc file export PATH="/opt/homebrew/bin:$PATH as opposed to export PATH=/usr/local/bin:$PATH as indicated in several answers to similar questions. After running source ~/.zshrc and brew doctor the system confirmed the path had been updated properly.
Changing the Homebrew Apache PATH variable
I found the answer here.
To change Apache environment variables when Apache was installed with Homebrew, edit the homebrew.mxcl.httpd24.plist file located in /usr/local/Cellar/httpd24/your version of Apache/.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- add this -->
<!-- end add -->
Then restart Apache.
Getting a warning when installing homebrew on MacOS Big Sur (M1 chip)
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 :
- Edit your
~/.bashrcwith at the end of file:
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
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