亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

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.)


正在回答

4 回答

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?安裝成功


1 回復 有任何疑惑可以回復我~
#1

來碗稀豆粉

試驗后可行,接下來如果報 zsh: command not found: xorm 需要進到xorm目錄編譯下方能使用 cd ($GOPATH)/src/github.com/go-xorm/cmd/xorm go build 添加當前目錄到PATH變量
2019-03-26 回復 有任何疑惑可以回復我~

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

0 回復 有任何疑惑可以回復我~

這兩個依賴的源代碼在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


0 回復 有任何疑惑可以回復我~

我同樣遇到這個問題:

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


0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

go get github.com/go-xorm/cmd/xorm 安裝失敗

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號