go - 没有这样的工具 "asm"

标签 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"

这是我的 go env
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

最佳答案

我确实发现了同样的错误。
no asm
结果是我的防病毒软件阻止了 asm.exe 文件。所以我必须从防病毒扫描中排除 go 目录 .在那之后重新安装去或只是修复安装也做这项工作。
enter image description here

关于go - 没有这样的工具 "asm",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52658811/

相关文章:

sql - 如何修复golang sql字符串转换扫描错误

Golang 形式编码嵌套结构

testing - 如何模拟 DNS 请求? (米克/dns)

json - json.Decode不会解码数字

go - channel 如何在使用 channel 查找素数问题中工作?

parsing - 如何正确解析时区代码

go - beego 必须有一个寄存器 DataBase 别名 `default`

json - 是否可以将 "Omitempty"json 标记作为默认行为?

go - 需要帮助理解为什么 select{} 不会永远阻塞

json - 使用json.Unmarshal()时保留尾随零