An alternative Homebrew installation script that eliminates annoying
brew doctor
notices by putting Homebrew into~/.homebrew
instead of/usr/local
.
- Install your own stuff to
/usr/local
withoutbrew doctor
complaining. - Allow programs like
Kaleidoscope
orMacVim
to install its command-line helper to/usr/local
withoutbrew doctor
complaining. - You'll never have to do crazy things like
chown /usr/local
orsudo brew install
.
YES! This method of installation is well documented on the homebrew wiki. It downloads the latest homebrew from the canonical respository and unarchives into ~/.homebrew
. That's it!
No more random brew doctor
warnings (besides the safe one as noted below). This is a huge improvement over the default installation.
NOTE: if you already have homebrew installed, you should uninstall it first (especially if you installed it or any formula using sudo
). It is also recommended that you install either Xcode or the command-line developer tools and agree to the license as depicted here.
% bash < <(curl -sL https://raw.github.com/wilmoore/homebrew-home/master/install)
Once installation is complete, you'll need to make sure homebrew's paths are configured into your shell environment. Add $HOME/.homebrew/{bin,sbin}
to $PATH
and $HOME/.homebrew/share/man:$MANPATH
to $MANPATH
respectively to your shell RC file. My dotfiles repo depicts an example of this in my .zshenv.
NOTE: I use ZSH; however, you can adapt the variable setting to the shell of your choice. If you'd like to install ZSH, I have a little helper script that will get you up and running quickly.
% bash < <(curl -sL https://raw.github.com/wilmoore/homebrew-home/master/activate-homebrew-zsh)
% rm -rf ~/.homebrew
The following brew doctor
warning can be ignored (see Is this safe?):
Warning: Your Homebrew is not installed to /usr/local
You can install Homebrew anywhere you want, but some brews may only build correctly if you install in /usr/local. Sorry!
MIT