没有这样的工具“ asm”

时间:2018-10-05 05:23:13

标签: go

我正在尝试安装golang并使用可视代码运行它。我已经按照所有步骤进行安装,但是,每当在可视代码中运行它并尝试安装推荐的功能时,都会出现以下错误:

Installing github.com/mdempsky/gocode FAILED Installing github.com/uudashr/gopkgs/cmd/gopkgs FAILED Installing github.com/ramya-rao-a/go-outline FAILED Installing github.com/acroca/go-symbols FAILED Installing golang.org/x/tools/cmd/guru FAILED Installing golang.org/x/tools/cmd/gorename FAILED Installing github.com/derekparker/delve/cmd/dlv FAILED Installing github.com/stamblerre/gocode FAILED Installing github.com/rogpeppe/godef FAILED Installing github.com/ianthehat/godef FAILED Installing github.com/sqs/goreturns FAILED Installing github.com/golang/lint/golint FAILED

12 tools failed to install.

gocode: Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/mdempsky/gocode github.com/mdempsky/gocode (download) go tool: no such tool "asm" github.com/mdempsky/gocode (download) go tool: no such tool "asm"

gopkgs: Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/uudashr/gopkgs/cmd/gopkgs github.com/uudashr/gopkgs (download) github.com/karrick/godirwalk (download) github.com/pkg/errors (download) go tool: no such tool "asm" github.com/uudashr/gopkgs (download) github.com/karrick/godirwalk (download) github.com/pkg/errors (download) go tool: no such tool "asm"

go-outline: Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/ramya-rao-a/go-outline github.com/ramya-rao-a/go-outline (download) Fetching https://golang.org/x/tools/go/buildutil?go-get=1 Parsing meta tags from https://golang.org/x/tools/go/buildutil?go-get=1 (status code 200) get "golang.org/x/tools/go/buildutil": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/go/buildutil?go-get=1 get "golang.org/x/tools/go/buildutil": verifying non-authoritative meta tag Fetching https://golang.org/x/tools?go-get=1 Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200) golang.org/x/tools (download) go tool: no such tool "asm" github.com/ramya-rao-a/go-outline (download) Fetching https://golang.org/x/tools/go/buildutil?go-get=1 Parsing meta tags from https://golang.org/x/tools/go/buildutil?go-get=1 (status code 200) get "golang.org/x/tools/go/buildutil": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/go/buildutil?go-get=1 get "golang.org/x/tools/go/buildutil": verifying non-authoritative meta tag Fetching https://golang.org/x/tools?go-get=1 Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200) golang.org/x/tools (download) go tool: no such tool "asm"

go-symbols: Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/acroca/go-symbols github.com/acroca/go-symbols (download) Fetching https://golang.org/x/tools/go/buildutil?go-get=1 Parsing meta tags from https://golang.org/x/tools/go/buildutil?go-get=1 (status code 200) get "golang.org/x/tools/go/buildutil": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/go/buildutil?go-get=1 get "golang.org/x/tools/go/buildutil": verifying non-authoritative meta tag Fetching https://golang.org/x/tools?go-get=1 Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200) golang.org/x/tools (download) go tool: no such tool "asm" github.com/acroca/go-symbols (download) Fetching https://golang.org/x/tools/go/buildutil?go-get=1 Parsing meta tags from https://golang.org/x/tools/go/buildutil?go-get=1 (status code 200) get "golang.org/x/tools/go/buildutil": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/go/buildutil?go-get=1 get "golang.org/x/tools/go/buildutil": verifying non-authoritative meta tag Fetching https://golang.org/x/tools?go-get=1 Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200) golang.org/x/tools (download) go tool: no such tool "asm"

这是我的环境

C:\WINDOWS\system32>go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Publio\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\gocode
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\Publio\AppData\Local\Temp\go-build872751422=/tmp/go-build -gno-record-gcc-switches

1 个答案:

答案 0 :(得分:0)

我确实发现了相同的错误。 no asm

事实证明我的防病毒软件阻止了asm.exe文件。因此我必须从防病毒扫描中排除go目录。之后,重新安装即可或只需修复安装即可。

enter image description here