Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install Go 1.4 #459

Open
grandstairs opened this issue Feb 16, 2024 · 8 comments
Open

Cannot install Go 1.4 #459

grandstairs opened this issue Feb 16, 2024 · 8 comments

Comments

@grandstairs
Copy link

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
@kaykhan
Copy link

kaykhan commented Apr 3, 2024

Did you find a fix?

@grandstairs
Copy link
Author

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

@ryan-ju
Copy link

ryan-ju commented May 30, 2024

I found a workaround (on macos). Instead of doing the crazy bootstrapping chain, you can do this:

  1. Download the .tar.gz file from the official site https://go.dev/dl/ and unpack it somewhere (it'll decompress to a go dir)
  2. In a terminal add the go to PATH:
export PATH="<where your go dir is>/bin:$PATH"
  1. Run gvm install go1.22.3 or whatever version you need.
  2. Delete the go dir in step 1
  3. 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

@Kyungminkim31
Copy link

I found a workaround (on macos). Instead of doing the crazy bootstrapping chain, you can do this:

  1. Download the .tar.gz file from the official site https://go.dev/dl/ and unpack it somewhere (it'll decompress to a go dir)
  2. In a terminal add the go to PATH:
export PATH="<where your go dir is>/bin:$PATH"
  1. Run gvm install go1.22.3 or whatever version you need.
  2. Delete the go dir in step 1
  3. 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!

@mhazizk
Copy link

mhazizk commented Jul 24, 2024

I found a workaround (on macos). Instead of doing the crazy bootstrapping chain, you can do this:

  1. Download the .tar.gz file from the official site https://go.dev/dl/ and unpack it somewhere (it'll decompress to a go dir)
  2. In a terminal add the go to PATH:
export PATH="<where your go dir is>/bin:$PATH"
  1. Run gvm install go1.22.3 or whatever version you need.
  2. Delete the go dir in step 1
  3. 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

@emilianosantucci
Copy link

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.

@wannte
Copy link

wannte commented Oct 31, 2024

@emilianosantucci

go.14 does not have ARM binary.

@emilianosantucci
Copy link

@wannte Sorry, wrong version, try this:

So use the binary install: gvm install go1.20 -B followed by gvm use go 1.20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants