gvm icon indicating copy to clipboard operation
gvm copied to clipboard

Installing on MacOS Big Sur

Open bullgare opened this issue 3 years ago • 7 comments

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:

  1. Install go from the official site
  2. gvm install go1.15.5
  3. gvm use go1.15.5 --default
  4. sudo rm -rvf /usr/local/go/ (which will uninstall non-gvm version).

bullgare avatar Nov 28 '20 15:11 bullgare

Thanks @bullgare, this worked for me as well.

teuber789 avatar Dec 01 '20 21:12 teuber789

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.

dkorunic avatar Dec 04 '20 08:12 dkorunic

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

patrykkrawczyk avatar Jan 05 '21 12:01 patrykkrawczyk

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

septs avatar Mar 13 '21 08:03 septs

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.

jeremy-ebler-vineti avatar May 29 '21 01:05 jeremy-ebler-vineti

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

curtismenmuir avatar Jun 28 '22 23:06 curtismenmuir

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

dothanhlam avatar Jan 04 '23 00:01 dothanhlam