• 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

  • 相关阅读:
    IEnumerable和IQueryable的区别
    最全的ASP.NET MVC路由配置,以后RouteConfig再弄不懂去吃翔
    JSON遍历方法
    将Sublime Text 2搭建成一个好用的IDE
    Linux入门教程
    apache如何配置默认的根目录
    Web移动端Fixed布局的解决方案
    node-创建模块
    关于文字内容溢出用点点点(…)省略号表示
    JavaScript设计模式与开发实践 | this、call和apply
  • 原文地址:https://www.cnblogs.com/no-nick/p/12807926.html
Copyright © 2020-2023  润新知