Skip to content

Instantly share code, notes, and snippets.

@emanuelschmoczer
Forked from skluck/instructions.md
Last active August 8, 2023 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emanuelschmoczer/deebc9b53d008ac1d1f256a6bf0a4c05 to your computer and use it in GitHub Desktop.
Save emanuelschmoczer/deebc9b53d008ac1d1f256a6bf0a4c05 to your computer and use it in GitHub Desktop.
Installing Homebrew in $HOME

1 (optional) Ensure xcode is up to date

Download the latest version from the Mac App Store

2 Install Command Line Tools

Either run xcode-select --install or if that fails, manually download them from the Apple Developer Site.

3 (optional) Uninstall Homebrew from /usr/local

Run /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

Download the uninstall script and run ./uninstall --help to view more uninstall options.

4 Download homebrew

Clone https://github.com/homebrew/brew into $HOME/homebrew

5 Add to path in .bashrc

Add homebrew to your $PATH.

Example:

export PATH="$HOME/homebrew/bin:$HOME/homebrew/sbin:$PATH"

6 (optional) Isolated bins

Add a separate bin directory to $PATH if you manually download bins on occasion. For example, composer, nvm, rvm, or go binaries.

export PATH="$HOME/bin:$PATH"

Verification

Run brew doctor and fix any issues it presents. It will always warn about having homebrew outside of /usr/local, that is ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment