按照官方網站步驟:
1, git config --global http.sslVerify false
2, go get github.com/astaxie/beego
依然存在錯誤如下:
package golang.org/x/crypto/acme/autocert: unrecognized import path "golang.org/x/crypto/acme/autocert" (https fetch: Get https://golang
.org/x/crypto/acme/autocert?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.)
分析原因: 依賴庫下載失敗
解決方法:
1, 在GOPATH目錄下創建文件夾crypto
mkdir -p $GOPATH/src/golang.org/x
2, 進入文件夾
cd $GOPATH/src/golang.org/x
3, 下載crypto
git config --global http.postBuffer 524288000(若庫很大, 設置下載容量)
git clone https://github.com/golang/crypto crypto
4, 安裝
go install crypto
依賴庫安裝成功,重新下載beego