zoukankan      html  css  js  c++  java
  • VSCode安装go语言开发环境,go插件问题解决

     

    在安装go插件时,会自动更新很多依赖库文件,都是从Github更新下来,但是因为Github的文件中,多有应用go官网中的文件,导致,因为网络缘故,不能直接下载,导致安装失败,如下:

    1.  
      Installing github.com/nsf/gocode SUCCEEDED
    2.  
      Installing github.com/uudashr/gopkgs/cmd/gopkgs SUCCEEDED
    3.  
      Installing github.com/ramya-rao-a/go-outline FAILED
    4.  
      Installing github.com/acroca/go-symbols FAILED
    5.  
      Installing golang.org/x/tools/cmd/guru FAILED
    6.  
      Installing golang.org/x/tools/cmd/gorename FAILED
    7.  
      Installing github.com/fatih/gomodifytags SUCCEEDED
    8.  
      Installing github.com/haya14busa/goplay/cmd/goplay SUCCEEDED
    9.  
      Installing github.com/josharian/impl FAILED
    10.  
      Installing github.com/rogpeppe/godef SUCCEEDED
    11.  
      Installing sourcegraph.com/sqs/goreturns FAILED
    12.  
      Installing github.com/golang/lint/golint FAILED
    13.  
      Installing github.com/cweill/gotests/... FAILED
    14.  
      Installing github.com/derekparker/delve/cmd/dlv SUCCEEDED
    15.  
       
    16.  
      8 tools failed to install.
    这些失败的库,不是没有下载下来,而是以来的文件在go官网上,导致失败。以下为解决办法,
    1、在%GOPATH%src 目录下,建立golang.org 文件夹,并再新建x文件夹。  目录为 "%GOPATHsrcgolang.orgx"
     
    2、完成目录切换后,开始下载插件包:
    git clone https://github.com/golang/tools.git tools
     
    3、执行完以后,会多一个tools文件夹。
    4、打开vsCode终端,切换到 终端,进入“%GOPATH”目录,执行 

    go install github.com/ramya-rao-a/go-outline

    go install github.com/acroca/go-symbols

    go install golang.org/x/tools/cmd/guru

    go install golang.org/x/tools/cmd/gorename

    go install github.com/josharian/impl

    go install github.com/rogpeppe/godef

    go install github.com/sqs/goreturns

    go install github.com/golang/lint/golint

    go install github.com/cweill/gotests/gotests

    go install github.com/ramya-rao-a/go-outline

    go install github.com/acroca/go-symbols

    go install golang.org/x/tools/cmd/guru

    go install golang.org/x/tools/cmd/gorename

    go install github.com/josharian/impl

    go install github.com/rogpeppe/godef

    go install github.com/sqs/goreturns

    go install github.com/golang/lint/golint

    go install github.com/cweill/gotests/gotests

    按此方法,可以安装成功。

    参考博文:

    http://www.pythonsite.com/?p=429

    http://blog.csdn.net/langzi7758521/article/details/51313521

  • 相关阅读:
    电子科技大学实验中学PK赛(二)比赛题解
    伊苏比的梦幻之旅(三)比赛题解
    电子科技大学实验中学PK赛(一)比赛题解
    伊苏比的梦幻之旅(二)比赛题解
    伊苏比的梦幻之旅(一)比赛题解
    The Solution of UESTC 2016 Summer Training #1 Div.2 Problem C
    The Solution of UESTC 2016 Summer Training #1 Div.2 Problem B
    c++11 多线程间共享数据 <c++ concurrency in action>
    c++11 多线程 2<<c++ concurrency in action>>
    c++11 多线程 1<<c++ concurrency in action>>
  • 原文地址:https://www.cnblogs.com/lvdongjie/p/9552601.html
Copyright © 2011-2022 走看看