gpt4 book ai didi

Golang 另一个无法识别的导入路径

转载 作者:数据小太阳 更新时间:2023-10-29 03:35:42 25 4
gpt4 key购买 nike

当我尝试安装 golint(或 gin,例如)时,出现“无法识别的导入路径错误”。

我知道有很多相同的问题,但主要答案是检查环境变量。

我的环境变量、我的文件夹和控制台有错误的屏幕截图。 enter image description here

我尝试使用 .msi 安装程序和仅通过复制文件和手动设置 env var 来安装 go。我得到了相同的结果。

最佳答案

有一个go get issue currently discussed

my go tools were out of date, but go get could not update them because they switched form mercurial to git at some point. Deleting the whole golang.org/x/tools directory in my GOPATH and reinstalling fixed the issue.

确保你有最新的 go,并尝试使用一个新的空 GOPATH 文件夹,看看问题是否仍然存在。

关于Golang 另一个无法识别的导入路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33207967/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com