-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/go: download go1.22 for darwin/arm64: toolchain not available #65568
Comments
Thanks for reporting. What's the output of (As a side note, when it's working as intended, it's not necessary to |
I've installed Go with homebrew and am on an Intel mac.
|
@adamdecaf Since your Go toolchain was installed using a different tool, it's hard to know if it's the same problem or a different homebrew-specific problem. Let's wait to hear back from @EwenQuim or someone who's able to reproduce this the problem that affects the Go installer from go.dev/dl/. |
Does this go.mod file say |
GOTOOLCHAIN=local go envGO111MODULE='' GOARCH='arm64' GOBIN='' GOCACHE='/Users/ewenq/Library/Caches/go-build' GOENV='/Users/ewenq/Library/Application Support/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='arm64' GOHOSTOS='darwin' GOINSECURE='' GOMODCACHE='/Users/ewenq/go/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='darwin' GOPATH='/Users/ewenq/go' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOROOT='/usr/local/go' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='local' GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64' GOVCS='' GOVERSION='go1.22.0' GCCGO='gccgo' AR='ar' CC='clang' CXX='clang++' CGO_ENABLED='1' GOMOD='/dev/null' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/5g/q9_gydg96zzd59zgh0hscvqh0000gn/T/go-build2955048168=/tmp/go-build -gno-record-gcc-switches -fno-common' I don't see anything wrong here, but it might be only my local setup |
is this in a module (if yes, what's the |
@EwenQuim Thanks. Can you post more complete steps for how to reproduce it, in an empty directory? For example, does it reproduce if you do the following sequence?
Is the I can only reproduce this if I set
Otherwise it doesn't reproduce:
|
OK the problem is solved after I deleted the Sorry for taking some of your time, I will explain the cause of the bug below if you're interested, but no need to search more. |
Thanks. It's good to understand that the GOTOOLCHAIN=go1.22 line in the go/env file was causing this, and that it's not a problem with the Go installer. A problem like that is fixable, as you've done, by unsetting the unwanted value with |
The invalid version of Good learning for me: the Maybe that updating the go.dev page with more information can be a good idea to prevent future issues like this one ? |
After updating golang to 1.22 we have error: ``` go: download go1.22 for darwin/arm64: toolchain not available ``` golang/go#65568 Just set full version for golang to fix this issue
* fix: toolchain not available After updating golang to 1.22 we have error: ``` go: download go1.22 for darwin/arm64: toolchain not available ``` golang/go#65568 Just set full version for golang to fix this issue * fix: add build tag to windows cmd goland added this automatically :) * feat: add golangci-lint to build Using golangci-link makes it easier to check the code and avoid a lot of problems * fix: linters warnings * fix: a more specific definition of exclusion for gocritic
SOLVED I'm also running into this with Homebrew, and don't have a go/env directory. I have a
I recently upgraded my work laptop so this is a relatively new environment, and I have never run into this before, though I have always been using Homebrew. Edit: My laptop's specs are a 16" 2023 Apple M2 Max. I tried Output of
Edit 2: Since |
Fixed it by editing the Then Quit and Reopened VS Code |
Thanks for that last comment I think it's very counter intuitive for seems you have to do crazy stuff like
to get the actual go version instead of
also probably should say "go.mod has go 1.22 which isn't semantic versioning, please correct to 1.22.0" |
If you'd like to determine the bundled Go toolchain's version, it's possible to do it with
@ldemailly You're right that this can be improved. This is now tracked in issue #66175. Please feel free to follow it for updates. Since this issue is closed and there's another open one to track this problem, I'll lock this to avoid further replies pinging many people. If someone would like to report a different problem, please file a new issue at go.dev/issue/new. Thanks. |
Go version
go1.22
Output of
go env
in your module/workspace:go: downloading go1.22 (darwin/arm64) go: download go1.22 for darwin/arm64: toolchain not available
What did you do?
Then used the installer.
Then ran the command
go version
.go env
also returns this result.What did you see happen?
go: download go1.22 for darwin/arm64: toolchain not available
, not much moreWhat did you expect to see?
go1.22
The text was updated successfully, but these errors were encountered: