Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac brew doctor show Warning: Homebrew's sbin was not found in your PATH but you have installed formulae that put executables in /usr/local/sbin

Tags:

macos

homebrew

I try to upgrade python2.7 to python3 on macOS Catalina, when I run brew doctor, it shows:

Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so:
  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc

So I try the command echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc which did not works.

like image 963
marchuang Avatar asked Jul 18 '20 17:07

marchuang


3 Answers

Apple macOS has moved from Bash shell to Zsh (Z Shell).

Solution:
Run the command below in your terminal:

echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc

Now quit the terminal by pressing command+q, re-open the terminal and run brew doctor

like image 63
Masood Avatar answered Nov 12 '22 10:11

Masood


You need to close and re-open your terminar after applying:

echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc

like image 21
Andrei Andrade Avatar answered Nov 12 '22 10:11

Andrei Andrade


After some search I found the commands that works for me:

export PATH="/usr/local/bin:$PATH"
source ~/.bash_profile
like image 3
marchuang Avatar answered Nov 12 '22 12:11

marchuang