I am getting issues with permissions in Homebrew: After I installed Node and tried to install npm using the curl command Homebrew tells you to use, it would fail due to EACCESS errors. I checked the node folder and the permissions were a) unowned by a user (I had to chown it) and b) Had no write permissions (I had to chmod 755 it).
I've fixed the issue with NPM, but I had to run its install script as sudo (which is bad!).
I assume I must have installed Homebrew as root or something similar. I am hoping that reinstallation will fix it, but I can't find a source on how to reinstall Homebrew.
When I rerun the installer in Terminal I get:
/usr/local/.git already exists!
For me, this one worked without the sudo access.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
For more reference, please follow https://gist.github.com/mxcl/323731
Try running the command
brew doctor
and let us know what sort of output you getedit: And to answer the title question, this is from their FAQ :
So following that up with a clean re-install (following their latest recommended steps) should be your best bet.
Brew
already provide a command to uninstall itself:If you failed to run this command due to permission (like run as second user), run again with sudo
Then you can install again:
Process is to clean up and then reinstall with the following commands:
Notes:
curl | bash (or ruby)
commands before running themThe way to reinstall Homebrew is completely remove it and start over. The Homebrew FAQ has a link to a shell script to uninstall homebrew.
If the only thing you've installed in
/usr/local
is homebrew itself, you can justrm -rf /usr/local/* /usr/local/.git
to clear it out. But/usr/local/
is the standard Unix directory for all extra binaries, not just Homebrew, so you may have other things installed there. In that caseuninstall_homebrew.sh
is a better bet. It is careful to only remove homebrew's files and leave the rest alone.