Open bullgare opened 4 years ago
Thanks @bullgare, this worked for me as well.
Not only that, upgrading Go on Big Sur is broken since version checking code in download_binary() doesn't handle 11.0.x properly, resulting in "Binary Go unavailable for this platform" error message and exit 1.
in my opinion it's simpler and safer with brew (no need for sudo rm -rf):
brew install go
gvm install go1.15.5
gvm use go1.15.5 --default
brew uninstall go
without homebrew version
$ curl -sSL https://golang.org/dl/go1.16.2.darwin-amd64.tar.gz | tar zxv
$ export GOROOT_BOOTSTRAP="$(pwd)/go"
$ gvm install go1.16.2
Downloading Go source...
Installing go1.16.2...
* Compiling...
go1.16.2 successfully installed!
$ rm -rf go
I submitted a patch that should resolve this https://github.com/moovweb/gvm/pull/380
Go version 1.4.x, is ancient at this point and will not work on Big Sur (it's nearly 6 years old), but more recent binary versions work as expected.
Agree with @patrykkrawczyk re brew.
One thing to add, remember to export GOROOT_BOOTSTRAP
. If not then future gym install
commands will fail to compile
brew install go
gvm install go1.15.5
gvm use go1.15.5 --default
brew uninstall go
export GOROOT_BOOTSTRAP=$GOROOT
gvm install go1.18.3
gvm use go1.18.3 --default
For Mac M1, I was only success with go1.18
or go1.19
brew install go
gvm install go1.19
gvm use go1.19 --default
brew uninstall go
export GOROOT_BOOTSTRAP=$GOROOT
Installing go from scratch does not work for Big Sur as 1.4 does not have a binary for this OS (this command fails -
gvm install go1.4 -B
). To use gvm, you can do this:gvm install go1.15.5
gvm use go1.15.5 --default
sudo rm -rvf /usr/local/go/
(which will uninstall non-gvm version).