赞
踩
Win10, vscode 调试go代码时,安装dlv失败。
Installing 1 tool at C:\Users\haozhuan\go\bin in module mode.
dlv
Installing github.com/go-delve/delve/cmd/dlv@latest FAILED
{
“killed”: false,
“code”: 1,
“signal”: null,
“cmd”: “C:\Program Files (x86)\Go\bin\go.exe install -v github.com/go-delve/delve/cmd/dlv@latest”,
“stdout”: “”,
“stderr”: “C:\Users\haozhuan\go\pkg\mod\github.com\go-delve\delve@v1.9.1\service\debugger\debugger.go:28:2: found packages native (proc.go) and your_operating_system_and_architecture_combination_is_not_supported_by_delve (support_sentinel.go) in C:\Users\haozhuan\go\pkg\mod\github.com\go-delve\delve@v1.9.1\pkg\proc\native\n”
}
1 tools failed to install.
dlv: failed to install dlv(github.com/go-delve/delve/cmd/dlv@latest): Error: Command failed: C:\Program Files (x86)\Go\bin\go.exe install -v github.com/go-delve/delve/cmd/dlv@latest
C:\Users\haozhuan\go\pkg\mod\github.com\go-delve\delve@v1.9.1\service\debugger\debugger.go:28:2: found packages native (proc.go) and your_operating_system_and_architecture_combination_is_not_supported_by_delve (support_sentinel.go) in C:\Users\haozhuan\go\pkg\mod\github.com\go-delve\delve@v1.9.1\pkg\proc\native
根据提示: your_operating_system_and_architecture_combination_is_not_supported_by_delve, 系统和架构不支持delve.
设置go 环境变量
go env -w GOARCH=amd64
再安装,成功:
Installing 1 tool at C:\Users\haozhuan\go\bin in module mode. dlv
Installing github.com/go-delve/delve/cmd/dlv@latest (dlv) SUCCEEDED
All tools successfully installed. You are ready to Go.
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/177922
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。