英文:
Golang another unrecognized import path
问题
当我尝试安装golint(或gin,例如),我遇到了“无法识别的导入路径错误”。
我知道有很多相同的问题,但主要答案是检查环境变量。
我尝试使用.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.
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论