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

go install err #3518

Open
PaiHL opened this issue May 29, 2024 · 2 comments
Open

go install err #3518

PaiHL opened this issue May 29, 2024 · 2 comments
Labels
Bug Something isn't working

Comments

@PaiHL
Copy link

PaiHL commented May 29, 2024

Description

dev@devdeiMac-Pro code % go install github.com/wailsapp/wails/v2/cmd/wails@latest
go: github.com/wailsapp/wails/v2/cmd/wails@latest (in github.com/wailsapp/wails/[email protected]): go.mod:5: unknown directive: toolchain

To Reproduce

dev@devdeiMac-Pro code % go install github.com/wailsapp/wails/v2/cmd/wails@latest
go: github.com/wailsapp/wails/v2/cmd/wails@latest (in github.com/wailsapp/wails/[email protected]): go.mod:5: unknown directive: toolchain

Expected behaviour

dev@devdeiMac-Pro code % go install github.com/wailsapp/wails/v2/cmd/wails@latest
go: github.com/wailsapp/wails/v2/cmd/wails@latest (in github.com/wailsapp/wails/[email protected]): go.mod:5: unknown directive: toolchain

Screenshots

No response

Attempted Fixes

No response

System Details

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/dev/Library/Caches/go-build"
GOENV="/Users/dev/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/dev/go/pkg/mod"
GONOPROXY="gitlab.forensix.cn"
GONOSUMDB="gitlab.forensix.cn"
GOOS="darwin"
GOPATH="/Users/dev/go"
GOPRIVATE="gitlab.forensix.cn"
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.20.9"
GCCGO="gccgo"
GOAMD64="v1"
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 x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/lt/2lkcjlbx23qgj_kgc2ykbw4w0000gn/T/go-build3486414844=/tmp/go-build -gno-record-gcc-switches -fno-common"

Additional context

No response

@PaiHL PaiHL added the Bug Something isn't working label May 29, 2024
@lastgitforlife
Copy link

Hi @PaiHL, I encountered a similar issue to this and found a solution. It appears to be from the toolchain command in go.mod, and looking it up that is a feature from Go 1.21. As you are using 1.20.9, try updating to at least 1.21 and try the commands again.

Cheers!

@PaiHL
Copy link
Author

PaiHL commented May 31, 2024

Hi @PaiHL, I encountered a similar issue to this and found a solution. It appears to be from the toolchain command in go.mod, and looking it up that is a feature from Go 1.21. As you are using 1.20.9, try updating to at least 1.21 and try the commands again.

Cheers!

是的,可以升级go版本解决。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants