To solve Warning: /opt/homebrew/bin is not in your PATH Installing Homebrew On Macos Big Sur (M1 Chip) error follow below methods.
ERROR LOG
Warning: /opt/homebrew/bin is not in your PATH. Add Homebrew to your PATH in /Users/jasonnewton/ .zprofile: echo ' eval $(/opt/homebrew/bin/brew shellenv)' >> /Users/jasonnewton/ .zprofile eval $(/opt/homebrew/bin/brew shellenv) Run 'brew help' to get started
Contents
How to solve Warning: /opt/homebrew/bin is not in your PATH ?
Waning is showing that it is the location in which the binaries or homebrew are stored, so you must add homebrew PATH to /.zshrc OR /.bashrc. The issue is stated in the warning: Warning: The directory /opt/homebrew/bin is not in your PATH. It appears to be the place where the binaries of hombrew are stored. To resolve, you can perform the following:
Add the following to the end of your /.zshrc or /.bashrc file:
export PATH=/opt/homebrew/bin:$PATH
After this, tap source ~/.zshrc
in your terminal or restart it.
Alternative to fix Warning: /opt/homebrew/bin is not in your PATH
To resolve this warning, you can follow the below steps:
Edit your ~/.bashrc with at the end of file :
export PATH=/opt/homebrew/bin:$PATH
To edit run the below command
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
Now you’re good to go.
Fix Warning: /opt/homebrew/bin is not in your PATH with Xcode
- Check to see if you’ve already installed Xcode. In your terminal, type the following command:
/usr/bin/xcodebuild -version
Running above command will print the below sample output Xcode 12.3 Build version 12C33 - Now Open Xcode Select preferences Select location tab. Now from dropdown menu in command Line Tool select your Xcode version.
- In terminal run below command
- /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”
- 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
Hope the above solution works.
Also read :
Error: Node Sass version 5.0.0 is incompatible with ^4.0.0.
ERROR: Preprocessor transform input data failed nvinfer error:NVDSINFER_CUDA_ERROR