vscode安装go相关插件失败或go get安装第三方包失败


比如安装下面第三方包

C:\Users\xxx>go get github.com/denisenkom/go-mssqldb
go get github.com/denisenkom/go-mssqldb: module github.com/denisenkom/go-mssqldb: Get "https://proxy.golang.org/github.com/denisenkom/go-mssqldb/@v/list": dial tcp 172.217.24.17: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.

或vscode安装下面的失败

Installing 8 tools at D:\GoPath\bin
  go-outline
  go-symbols
  guru
  gorename
  dlv
  godef
  goreturns
  golint

Installing golang.org/x/tools/cmd/guru FAILED
Installing github.com/ramya-rao-a/go-outline FAILED
Installing golang.org/x/tools/cmd/gorename FAILED
Installing github.com/derekparker/delve/cmd/dlv SUCCEEDED
Installing github.com/acroca/go-symbols FAILED
Installing golang.org/x/tools/cmd/guru FAILED
Installing github.com/rogpeppe/godef SUCCEEDED
Installing golang.org/x/tools/cmd/gorename FAILED
Installing github.com/derekparker/delve/cmd/dlv SUCCEEDED
Installing github.com/rogpeppe/godef SUCCEEDED
Installing github.com/sqs/goreturns FAILED
Installing github.com/golang/lint/golint FAILED

解决方法

  • 从GitHub上clone下来安装
  • 最省事的:改GOPROXY代理环境变量为https://goproxy.cn,或其他代理地址


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM