英文:
Go error installing dependency, producing EOF
问题
我刚刚收到一台新的笔记本电脑,上面安装了Win系统(21H2版本19044.1415),然后我试图安装我的Go项目。在运行go build
之后,我一直收到EOF错误。
我尝试在Jetbrains Goland、VS Code(在安装gopls时显示EOF错误)或者纯命令行中同步依赖项,但结果在任何地方都是相同的。请看下面的错误信息:
go get github.com/dgrijalva/jwt-go/v4 go: module github.com/dgrijalva/jwt-go/v4: Get "https://proxy.golang.org/github.com/dgrijalva/jwt-go/v4/@v/list": EOF
欢迎提供任何修复此问题的想法。
英文:
I have just received a new notebook with Win onboard (21H2 build 19044.1415) and tried to install my Go project. After running go build
I just keep receiving EOF errors.
I tried to sync dependencies in Jetbrains Goland, in VS Code (it is saying EOF when trying to install gopls) or just in plain command line - the result is the same everywhere. Please see the following error:
go get github.com/dgrijalva/jwt-go/v4
go: module github.com/dgrijalva/jwt-go/v4: Get "https://proxy.golang.org/github.com/dgrijalva/jwt-go/v4/@v/list": EOF
Any ideas ho to fix it would be welcome.
答案1
得分: 1
问题已解决。问题出在我连接的WiFi网络上。有一些代理服务器阻止了依赖项的下载(也许在这种情况下需要调整GONOPROXY、GOPROXY、GONOSUMDB)。我连接到另一个网络后,一切都正常了。虽然花了一两个小时来找出问题所在,但错误信息肯定应该更具信息性。
英文:
Issue solved. The problem was in wifi network I was connected to. There were some proxy servers that prevented dependencies from downloading (maybe GONOPROXY, GOPROXY, GONOSUMDB should be tweaked in this case). I connected to another network and everything was fine. Spent an hour or two trying to find out the problem though. Error message should definetely be changed to smth more informative.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论