菜单 学习猿地 - LMONKEY

VIP

开通学习猿地VIP

尊享10项VIP特权 持续新增

知识通关挑战

打卡带练!告别无效练习

接私单赚外块

VIP优先接,累计金额超百万

学习猿地私房课免费学

大厂实战课仅对VIP开放

你的一对一导师

每月可免费咨询大牛30次

领取更多软件工程师实用特权

入驻
276
0

VScode 1.13 gocode提示dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected..

原创
05/13 14:22
阅读数 25712

在将VScode升级至 1.13后让升级gocode,在升级时报出如下错误

D:\go_work\src>go get -u -v github.com/mdempsky/gocode
github.com/mdempsky/gocode (download)
Fetching https://golang.org/x/tools/go/gcexportdata?go-get=1
https fetch failed: Get https://golang.org/x/tools/go/gcexportdata?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/go/gcexportdata: unrecognized import path "golang.org/x/tools/go/gcexportdata" (https fetch: Get https://golang.org/x/tools/go/gcexportdata?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

失败原因,发现是从github/golang中下载的tools不包含gocode

解决方法:

根据提示图片信息进行查找,(github/golang下载详见:http://lc161616.cnblogs.com/p/10132518.html)。提示图片如下:

    根据vscode提示去github.com/mdempsky/gocode clone下来代码。然后放置到提示图片的路径下:为了保险我又放置在%GOPATH%\src\golang.org\x\tools下一份。

    最后手动执行go get,安装成功

D:\go_work\src>go  get -u -v github.com/mdempsky/gocode
github.com/mdempsky/gocode (download)
Fetching https://golang.org/x/tools/go/gcexportdata?go-get=1
https fetch failed: Get https://golang.org/x/tools/go/gcexportdata?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
golang.org/x/tools (download)
Fetching https://golang.org/x/tools/go/internal/gcimporter?go-get=1
https fetch failed: Get https://golang.org/x/tools/go/internal/gcimporter?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
github.com/mdempsky/gocode/internal/lookdot
github.com/mdempsky/gocode/internal/cache
github.com/mdempsky/gocode/internal/suggest
github.com/mdempsky/gocode/internal/gbimporter
github.com/mdempsky/gocode

 

发表评论

0/200
276 点赞
0 评论
收藏
为你推荐 换一批