go get github.com/go-xorm/cmd/xorm 安裝失敗
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.)
2019-03-11
xorm cmd 墻內安裝
有兩個庫不能墻內訪問 civil crypto.所以我們需要迂回一下安裝。
可以直接用 git clone github.com 上的庫。這兩個庫都可以在GitHub上找到。
2018-12-31
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
2018-12-31
這兩個依賴的源代碼在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
2018-11-27
我同樣遇到這個問題:
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