简体   繁体   中英

go build error: go tool: no such tool “link”

After command:

  go build

It shows an error:

 go tool: no such tool "link"

Details: my system is windows 10 -> 64 bits

go version: 1.11.5 
go env -> 
set GOARCH=386
set GOBIN=
set GOCACHE=c:\users\john\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=386
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=E:\codigo
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_386
set GCCGO=gccgo
set GO386=sse2
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CPFLAGS=-g -02
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -02
set CGO_FFLAGS=-g -02
set CGO_LDFLAGS=-g -02
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m32 -mtherads -fno-caret-diagnotics -Qunused-arguments -fmsessage-length=0 -fdebug-prefix-map=C:\USers\john\ApddData\Local\temp\go-build126731998=/tmp/go-build -gno-record-gcc-switches

I' not pretty sure what could be happening because this is the first time it happends to me, I just change my operating system(before was windows 7) and updated to windows 10 with all the recently updates.After that I install go and when I try to build my code, it shows the error

原来我下载了go的32位,但是我的机器是64位的,所以我只下载了go的64位,就可以了

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM