go
toolchain_error
ai_generated
true
go: go.mod requires go >= 1.22.0 (running go 1.21.5; GOTOOLCHAIN=local)
ID: go/toolchain-not-available
80%Fix Rate
90%Confidence
0Evidence
2024-06-10First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 1.21+ | active | — | — | — |
| 1.22+ | active | — | — | — |
Root Cause
go.mod declares a newer Go version than the installed toolchain, and GOTOOLCHAIN=local prevents automatic toolchain download.
generic中文
go.mod 声明的 Go 版本高于已安装的工具链,且 GOTOOLCHAIN=local 阻止自动下载工具链。
Workarounds
-
95% success
GOTOOLCHAIN=auto go build ./...
-
90% success
go install golang.org/dl/go1.22.0@latest ~/go/bin/go1.22.0 download ~/go/bin/go1.22.0 build ./...
Dead Ends
Common approaches that don't work:
-
60% fail
may use language features unavailable in 1.21, causing compile errors
-
100% fail
off is not a valid value; use local
-
100% fail
the build does not proceed