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

  • 相关阅读:
    XML文件的解析—DOM、SAX
    JSP :使用<%@include%>报Duplicate local variable path 错误
    XML文件的DTD编写
    DOM生成XML文件
    ArrayList增加扩容问题 源码分析
    实时事件统计项目:优化flume:用file channel代替mem channel
    CDH离线数据导入solr:利用MapReduceIndexerTool将json文件批量导入到solr
    solrconfig.xml介绍
    Solr Update插件自定义Update Chain按条件更新索引
    实时事件统计项目:优化solr和morphline的时间字段
  • 原文地址:https://www.cnblogs.com/no-nick/p/12807926.html
Copyright © 2011-2022 走看看