Golang另一个未被识别的导入路径

huangapple go评论86阅读模式
英文:

Golang another unrecognized import path

问题

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

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

这是我的环境变量、文件夹和带有错误的控制台的屏幕截图。
Golang另一个未被识别的导入路径

我尝试使用.msi安装程序和手动复制文件并手动设置环境变量来安装go。我得到了相同的结果。

英文:

When i am trying to install golint (or gin, for example) i get "unrecognized import path error".

I know that there are many same questions, but main answer is to check environment variables.

There is screenshot of my environment variables, my folders and console with error.
Golang另一个未被识别的导入路径

I tried to install go both with .msi installer and just by copying files and setting env var manually. I got the same results.

答案1

得分: 1

目前有一个正在讨论的问题,关于go get问题

> 我的go工具已经过时了,但是由于它们在某个时候从mercurial切换到了git,go get无法更新它们。在我的GOPATH中删除整个golang.org/x/tools目录并重新安装可以解决这个问题。

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

英文:

There is a 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.

Make sure you have the latest go, and try with a fresh empty GOPATH folder, to see if the issue persists.

huangapple
  • 本文由 发表于 2015年10月19日 14:32:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/33207967.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定