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

  • 相关阅读:
    mysql关联更新like,CONCAT,Length 函数使用
    泛型类
    libwebp 解码 webp格式的图片或者动画【源码】
    windwos自带的 一个xml库 MSXML 兼容宽字符
    使用华为云的arm搭建gogs
    centos7 arm mysql 安装
    关于脱壳的一些笔记
    关于OD调试的一些笔记
    关于对《汇编语言》第3版 作者:王爽的阅读总结
    使用Proxifier + Fiddler 抓任何包
  • 原文地址:https://www.cnblogs.com/no-nick/p/12807926.html
Copyright © 2011-2022 走看看