Cannot install Go 1.4
grandstairs opened this issue · 8 comments
I am struggling to figure out how to install Go on an ARM / Apple Silicon macbook.
$ gvm install go1.4
Installing go1.4...
* Compiling...
/Users/owner/.gvm/scripts/install: line 93: go: command not found
ERROR: Failed to compile. Check the logs at /Users/owner/.gvm/logs/go-go1.4-compile.log
ERROR: Failed to use installed version
Line 93 requires go env
to be working which it isn't because there is no Go binary installed.
So then I tried to install a Go 1.4 binary directly and that failed as well.
$ gvm install go1.4 -B
Installing go1.4 from binary source
ERROR: Failed to download binary go
$ echo $PATH
/Users/owner/.rvm/bin:/Users/owner/.gvm/bin:/opt/homebrew....
$ which go
go not found
Did you find a fix?
No, I went back to using homebrew for now and just manually changing versions if needed.
$ which go
/opt/homebrew/bin/go
$ go version
go version go1.22.0 darwin/arm64
I found a workaround (on macos). Instead of doing the crazy bootstrapping chain, you can do this:
- Download the
.tar.gz
file from the official site https://go.dev/dl/ and unpack it somewhere (it'll decompress to ago
dir) - In a terminal add the go to
PATH
:
export PATH="<where your go dir is>/bin:$PATH"
- Run
gvm install go1.22.3
or whatever version you need. - Delete the
go
dir in step 1 - Then run
gvm use go1.22.3 --default
. Otherwise it'll complain about invalid go version (you need to set a default, gvm doesn't set it for you).
Note the latest go actually requires >= 1.20 to compile
I found a workaround (on macos). Instead of doing the crazy bootstrapping chain, you can do this:
- Download the
.tar.gz
file from the official site https://go.dev/dl/ and unpack it somewhere (it'll decompress to ago
dir)- In a terminal add the go to
PATH
:export PATH="<where your go dir is>/bin:$PATH"
- Run
gvm install go1.22.3
or whatever version you need.- Delete the
go
dir in step 1- Then run
gvm use go1.22.3 --default
. Otherwise it'll complain about invalid go version (you need to set a default, gvm doesn't set it for you).Note the latest go actually requires >= 1.20 to compile
This works perfectly! Thanks!
I found a workaround (on macos). Instead of doing the crazy bootstrapping chain, you can do this:
- Download the
.tar.gz
file from the official site https://go.dev/dl/ and unpack it somewhere (it'll decompress to ago
dir)- In a terminal add the go to
PATH
:export PATH="<where your go dir is>/bin:$PATH"
- Run
gvm install go1.22.3
or whatever version you need.- Delete the
go
dir in step 1- Then run
gvm use go1.22.3 --default
. Otherwise it'll complain about invalid go version (you need to set a default, gvm doesn't set it for you).Note the latest go actually requires >= 1.20 to compile
perfectly works!!! thank you
TL;DR:
gvm install go1.4 -B
Follow this suggest #425 (comment) by @Krueladin to resolve it.
Using binary version (with -B option) instead source, the installation complete successfully without need go
pre-installed.