简体   繁体   English

我在为 vscode 安装 go 工具时遇到一些错误

[英]I am getting some errors in installing go tools for vscode

I am trying to setup my visual studio code for go language.我正在尝试为 go 语言设置我的 Visual Studio 代码。 but i am getting some errors in installing gopls and go-outline.但我在安装 gopls 和 go-outline 时遇到了一些错误。

errors错误

Installing github.com/ramya-rao-a/go-outline@latest FAILED
    {
     "killed": false,
     "code": 1,
     "signal": null,
     "cmd": "C:\\Program Files\\Go\\bin\\go.exe install -v github.com/ramya-rao-a/go-outline@latest",
     "stdout": "",
     "stderr": "C:\\Users\\harsh\\go\\pkg\\mod\\github.com\\ramya-rao-a\\go-outline@v0.0.0-20210608161538-9736a4bde949\\main.go:14:2: read C:\\Users\\harsh\\go\\pkg\\mod\\golang.org\\x\\tools@v0.1.1\\go\\buildutil\\allpackages.go: unexpected NUL in input\n"
    }

Installing golang.org/x/tools/gopls@latest FAILED
{
 "killed": false,
 "code": 1,
 "signal": null,
 "cmd": "C:\\Program Files\\Go\\bin\\go.exe install -v golang.org/x/tools/gopls@latest",
 "stdout": "",
 "stderr": "go: downloading golang.org/x/tools v0.1.11-0.20220407163324-91bcfb1bdf9c\nverifying github.com/sergi/go-diff@v1.1.0: zip: not a valid zip file\n"
}

the screenshot of the errors.错误的屏幕截图。

Is there any other way to install this tools?有没有其他方法来安装这个工具?

try using:尝试使用:

 go env -w GO111MODULE=on

and

go clean -modcache

and install again.并再次安装。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我的 ALB 端点出现 502 错误,针对 EKS 托管服务 - Why am I getting 502 errors on my ALB end points, targeted at EKS hosted services React Native 谷歌移动广告不起作用。 安装 npm add react-native-google-mobile-ads 后出现一些错误,请检查以下错误 - React Native Google Mobile Ads not working. After installing npm add react-native-google-mobile-ads I got some errors please check the below error 修改我正在使用的 package 的底层 Go 子依赖 - Modify underlying Go sub dependency on the package I am using 为什么我从 localStorage 中得到未定义? - Why I am getting undefined from the localStorage? 为什么我没有从反应 redux state 获得更新的值 - Why I am not getting the updated value from react redux state 为什么我在 iOS(颤振应用程序)中收到 Firebase AppCheck 错误 - Why am I getting a Firebase AppCheck error in iOS (Flutter app) 所以我正在构建一个应用程序,它具有这个功能,我不知道如何 go 关于它 - So am building an app and it has this feature that i dont know exactly how to go about it 为什么我收到 TypeErrors 'x' is not a function with firebase 集合查询? - Why am I getting TypeErrors 'x' is not a function with firebase collection query? 为什么我的 http 请求正文会出现乱码? - Why am I getting gibberish for http request body? 从firestore(firebase)获取数据时出现错误。 我正在使用本机反应 - I am getting an error while fetching data from firestore(firebase). I am using react native
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM