On Mac OS X 10.6.8 I just installed Homebrew. It broke ClamXav. So I uninstalled it, and installed Homebrew's clamav. At the end of the installation process I received this:
/ Warning: /usr/local/sbin is not in your PATH
You can amend this by altering your ~/.bashrc file
I don't know what I'm supposed to do next? What path am I supposed amend from?
Thanks.
/etc/profile
~/.bash_profile
~/.bash_login
~/.profile
(OS X get's your path from those files. If the first one exists it grabs that path then it moves on to the next file to get more information and so on... For more information go to: http://ss64.com/osx/syntax-bashrc.html
Look for ~/.bash_profile
etc... until you see where your path is set. MOST of the time your path is normally set in ~/.bash_profile
so check that file first and if it's not in there but in another, change it over to ~/.bash_profile
It is possible that none of these files exists in which case homebrew will complain when you run command brew doctor
that /usr/local/bin is not ahead of /usr/bin/. Edit your ~/.bash_profile
to satisfy both homebrew and clamxav.
To make things as simple as possible and fix your problem, locate ~/.bash_profile
and:
No path or no ~/.bash_profile
: If you have no Path, open or create the file and input the following line: export PATH=/usr/local/bin:/usr/local/sbin:$PATH
If you need to create the file you can do so with terminal.app or even textedit but i would suggest terminal.
cd ~
to get to your home directory although you should be there.touch .bash_profile
which creates the empty file.pico .bash_profile
-> Now at this screen paste: export PATH=/usr/local/bin:/usr/local/sbin:$PATH
Enter
to save and Control + X
to exit. -> lastly you might as well update bash with the command: source .bash_profile
If ~/.bash_profile
exists with a path but /usr/local/sbin is not included, add it by appending /usr/local/sbin/
to any part, probably a good idea to put it after /usr/local/bin:
directories are separated by semi-colons. Make sure to keep the format consistent.
To make sure /usr/local/sbin is in your path open terminal and run: echo $PATH
you should see /usr/local/sbin somewhere in the output.
I had the same problem and just to add to Bobs answer, I found that the line usr/local/sbin
had to be added to /etc/paths
Thats running OS X 10.7.4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With