Homebrew on macOS
Normal installation procedure for single user Apple computer:
Before installing Homebrew install macOS command line tools with this command:
xcode-select --install
The best way to install Homebrew is to go the Homebrew’s homepage and copy the installation command into the terminal. It installs without sudo.
Multi-user mac install
On Intel based Apple computers the best way to have multiple users use Homebrew is to install it from one admin user account as per above. Non admin users, or new users to the system, can then use the packages installed normally. To update the packages or Homebrew itself either login to the original admin user who installed Homebrew and run updates or use su to run the updates from the terminal. Do not install a new version of Homebrew for each user on the system.
For Apple silicon computers (e.g., our M1 mini and all new Macs) homebrew changes its install location to /usr/opt, which is not in the default path for other users of the system. For the other users to use Homebrew normally the path must be added to the other users .zshrc file.
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}";
.zshrc must be created in the users home directory. At the terminaL: nano ~/.zshrc
. Then source ~/.zshrc
.
Subversion installation
Now install svn by typing this command into the terminal:
brew install subversion
Issues
Common installation issues can be found here:
https://docs.brew.sh/Common-Issues
On macOS it usually involves reinstalling the command line tools after a major OS upgrade, so:
xcode-select --install
Then:
brew upgrade
Uninstall
Uninstalling homebrew will fix a FUBAR install:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"