go get github.com/go-xorm/cmd/xorm 安装失败

来源:2-5 xorm工具的使用

游泳的石头

2018-11-24 11:10


D:\gowork>go get github.com/go-xorm/cmd/xorm

package cloud.google.com/go/civil: unrecognized import path "cloud.google.com/go/civil" (https fetch: Get https://cloud.google.com/go/civil?go-get=1: dial tcp 172.217.161.142:443: connectex: A connection attempt failed because th

e connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)


写回答 关注

4回答

  • qq_子非鱼_2
    2019-03-11 15:15:49
    xorm cmd 墙内安装

    有两个库不能墙内访问 civil crypto.所以我们需要迂回一下安装。
    可以直接用 git clone github.com 上的库。这两个库都可以在GitHub上找到。

    go get github.com/go-xorm/cmd/xorm
    失败 timeout
    
    cd ($GOPATH/src)/golang.org/x
    git clone https://github.com/golang/crypto.git
    
    cd ($GOPATH)/src/cloud.google.com/
    git clone  https://github.com/googleapis/google-cloud-go.git
    cd cloud.google.com 将 google-cloud-go 目录名更改为 go
    
    go install github.com/go-xorm/cmd/xorm 安装成功


    来碗稀豆粉

    试验后可行,接下来如果报 zsh: command not found: xorm 需要进到xorm目录编译下方能使用 cd ($GOPATH)/src/github.com/go-xorm/cmd/xorm go build 添加当前目录到PATH变量

    2019-03-26 19:42:52

    共 1 条回复 >

  • ganjinshan
    2018-12-31 17:53:11

    cd :D:\GOPATH\src\github.com\go-xorm\cmd;git pull --ff-only

    fatal:NO remote repository specified.Please,specify either a URL or a remote name form which

    bew revisions should be fetched.

    package github.com/go-xorm/cmd/xorm:exit status 1

  • PumpkinPie_
    2018-12-31 11:53:46

    这两个依赖的源代码在github上都有,通过git clone把源代码拉取拉下,然后把 clone下来的源代码的目录 改成与 import path “cloud.google.com/go/civil”相同就可以正常使用了。


    https://github.com/googleapis/google-cloud-go


    https://github.com/golang/crypto



    cloud.google.com下创建一个go文件夹,复制civil 文件夹内容 到 go 文件下


    答案整理自思否 @voidint


  • mgracy
    2018-11-27 17:29:57

    我同样遇到这个问题:

    D:\gitRepo\Go>go get github.com/go-xorm/cmd/xorm

    package cloud.google.com/go/civil: unrecognized import path "cloud.google.com/go/civil" (https fetch: Get https://cloud.google.com/go/civil?go-get=1: dial tcp 216.58.221.238: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.)

    但当我用外网的服务器的时候就可以安装,估计是被墙了。

    [root@localhost go-xorm]# ls
    builder  cmd  core  xorm


iris+xorm Go语言开发球星库

iris和xorm快速构建Web应用,Go设计开发球星库系统。

7895 学习 · 51 问题

查看课程

相似问题