Go is not available to install via Homebrew at the time of this writing. (Dec 18th 2020)
Go v1.16 will ship with Apple Silicon support in February of 2021, however the Go 1.16 beta can be installed from the Go website and can be linked to brew so that other brew packages that depend on Go may use it.
- Install go1.16beta1.darwin-arm64.pkg.
- Run
mkdir /opt/homebrew/Cellar/go
- Create a symlink to the Go v1.16 pkg installation with
ln -s /usr/local/go /opt/homebrew/Cellar/go/1.16
- Run
brew link go
- Ensure
/opt/homebrew/bin
is listed ahead of/usr/local/bin
in your $PATH - Open a new shell and test by running
go version
which should reportgo1.16beta1 darwin/arm64
- Running
which go
should show that it is coming from Homebrew as/opt/homebrew/bin/go
Installing packages from Homebrew that depend on Go will require checking the dependencies of the package using brew info <package_name>
and installing each of the dependencies (except for Go) manually by running brew install <dependency_name>
.
After installing all non-Go dependencies, we should be able to run brew install <package_name> --ignore-dependencies
to install the package while using the ARM version of Go linked from Homebrew.
# Attempt to install Direnv which relies on Go
> brew info direnv
...
==> Dependencies
Build: go ✘
> brew install direnv --ignore-dependencies
🍺 /opt/homebrew/Cellar/direnv/2.25.2: 10 files, 8.4MB, built in 4 seconds