Tag Archives: cmd/go: unsupported GOOS/GOARCH pair linux /amd64

cmd/go: unsupported GOOS/GOARCH pair linux /amd64 [How to Solve]

When compiling the go project under windowds, when you perform the following operations:

SET CGO_ENABLED = 0 
set GOARCH = amd64
 set GOOS = linux
go build main.go

The operation of set GOOS= linux is followed by a space after the linux, the compiler cannot automatically remove the space, causing the compilation to fail.
end!