zoukankan      html  css  js  c++  java
  • go get 找不到 google.golang.org/protobuf github.com/gin-gonic/gin 解决办法

    使用go get github.com/gin-gonic/gin时候遇到的,由于一些你懂的原因,找不到google.golang.org/protobuf/proto

    unrecognized import path "google.golang.org/protobuf/encoding/prototext": https fetch: Get "https://google.golang.org/protobuf/encoding/prototext?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.

    unrecognized import path "google.golang.org/protobuf/encoding/protowire": https fetch: Get "https://google.golang.org/protobuf/encoding/protowire?go-get=1": dial tcp 216.239.37.1:443: i/o timeout
    mabing@mabingdeMacBook-Pro logger % go get -u github.com/golang/protobuf/proto
    unrecognized import path "google.golang.org/protobuf/encoding/prototext": https fetch: Get "https://google.golang.org/protobuf/encoding/prototext?go-get=1": dial tcp 216.239.37.1:443: i/o timeout
    unrecognized import path "google.golang.org/protobuf/encoding/protowire": https fetch: Get "https://google.golang.org/protobuf/encoding/protowire?go-get=1": dial tcp 216.239.37.1:443: i/o timeout
    unrecognized import path "google.golang.org/protobuf/proto": https fetch: Get "https://google.golang.org/protobuf/proto?go-get=1": dial tcp 216.239.37.1:443: i/o timeout
    unrecognized import path "google.golang.org/protobuf/reflect/protoreflect": https fetch: Get "https://google.golang.org/protobuf/reflect/protoreflect?go-get=1": dial tcp 216.239.37.1:443: i/o timeout
    unrecognized import path "google.golang.org/protobuf/reflect/protoregistry": https fetch: Get "https://google.golang.org/protobuf/reflect/protoregistry?go-get=1": dial tcp 216.239.37.1:443: i/o timeout
    unrecognized import path "google.golang.org/protobuf/runtime/protoiface": https fetch: Get "https://google.golang.org/protobuf/runtime/protoiface?go-get=1": dial tcp 216.239.37.1:443: i/o timeout
    unrecognized import path "google.golang.org/protobuf/runtime/protoimpl": https fetch: Get "https://google.golang.org/protobuf/runtime/protoimpl?go-get=1": dial tcp 216.239.37.1:443: i/o timeout

    解决办法:

    项目代码托管在coding上,国内访问应该快一点
    地址:https://robinqiwei.coding.net/p/googleprotobuf/git

    LINUX上执行下面的命令:

    mkdir -p $GOPATH/src/google.golang.org

    git clone https://e.coding.net/robinqiwei/googleprotobuf.git $GOPATH/src/google.golang.org/protobuf

  • 相关阅读:
    ZF2系列 – Zend Framework 2 MVC實作 (Part 3)
    albumTable.php 加入checkreg和checklogin
    albumController.php 加入loginaction
    完美实现 ASP.NET 2.0 中的URL重写伪静态(映射)
    c#文件上传源代码
    收藏:ASP.NET正则表达式大全
    添加鼠标悬浮在控件上的提示信息 很齐全各种方法 MFC ToolTipCtl
    提交表单时执行func方法
    MFC程序设置自动启动,通过注册表实现(很详细的呃!)
    VC提供的Wizard生成的MFC App Wizard(exe)框架
  • 原文地址:https://www.cnblogs.com/no-nick/p/12807926.html
Copyright © 2011-2022 走看看