Homebrew is the de facto package management tool for Mac OS.
To install homebrew
:
# Head to https://brew.sh/ and follow the instructions
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Troubleshooting, Tips & How-Tos
Install previous versions of homebrew formulas
If the formula is still available from brew
API
Use the formula@version
syntax.
brew install gnupg@2.2
To stop brew
automatically upgrade the package:
brew pin gnupg@2.2
If the formula is no longer available from the brew
API
- Find the
formula.rb
from GitHub. E.g,. gnupg@2.2 (2.2.41) - Edit the formula using
brew edit gnupg@2.2
, replace the content with the desired formula from GitHub - Run
HOMEBREW_NO_INSTALL_FROM_API=1 brew reinstall gnupg@2.2
- Run
gpg --version
to verify that the correct version is installed - (Optional): use
brew pin gnupg@2.2
to prevent it from auto-upgrade