go get 安裝 go.etcd.io etcd clientv3 報錯
問題
直接使用
go get -u go.etcd.io/etcd/clientv3
安裝 go etcd clientv3,直接使用go get
是下載最新的程式碼,沒有經過嚴格測試。
可能會遇到如下問題:
go get -u go.etcd.io/etcd/clientv3
# go.etcd.io/etcd/clientv3/balancer/picker
workspace/go_projects/src/go.etcd.io/etcd/clientv3/balancer/picker/err.go:25:9: cannot use &errPicker literal (type *errPicker) as type Picker in return argument:
*errPicker does not implement Picker (wrong type for Pick method)
have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
want Pick(balancer.PickInfo) (balancer.PickResult, error)
workspace/go_projects/src/go.etcd.io/etcd/clientv3/balancer/picker/roundrobin_balanced.go:33:9: cannot use &rrBalanced literal (type *rrBalanced) as type Picker in return argument:
*rrBalanced does not implement Picker (wrong type for Pick method)
have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
want Pick(balancer.PickInfo) (balancer.PickResult, error)
解決辦法
下載已經發布版本的source code。
已經發布的版本相對來說比較穩定,不會遇到一些奇怪的問題。
例如,v3.4.13 ,下載地址v3.4.13。
下載後,解壓到$GOPATH目錄下:
tar zvxf etcd-3.4.13.tar.gz -C /home/lanyang/workspace/go_projects/src/go.etcd.io/
cd /home/lanyang/workspace/go_projects/src/go.etcd.io/
mv etcd-3.4.13/ etcd
相關文章
- etcd套路(七)安裝clientv3報錯問題的解釋client
- go get報錯connect: connection refusedGo
- go1.18 安裝godoc報錯Go
- go get 安裝gitlab私有包GoGitlab
- Go Gin安裝解決國內go get 方式安裝超時Go
- go get 拉取擴充套件報錯Go套件
- etcd套路(三)etcd的安裝
- 安裝配置ETCD
- go get 安裝 第三方包Go
- Go 解決國內go get安裝包超時問題Go
- 安裝heapster報錯
- 安裝VUE報錯Vue
- 二進位制檔案安裝安裝etcd
- GO get 安裝特別慢的問題以及 goland 載入 go moduleGoLand
- freeipa server安裝報錯Server
- Linux安裝virtualenvwrapper報錯LinuxAPP
- snipMate安裝後報錯
- CDC linux安裝報錯Linux
- pip 安裝 grpcio 報錯RPC
- 安裝grid軟體報錯
- eclipse 4.8安裝fat報錯Eclipse
- Composer 安裝 Laravel/passport 報錯LaravelPassport
- Kubernetes安裝報錯總結
- python (pip)安裝talib報錯Python
- 安裝ElasticSearch-6.2.3所遇到的安裝報錯Elasticsearch
- go對get、post請求封裝Go封裝
- mac安裝,Sail up初始化時報錯,ERROR [ 5/13] RUN apt-get update...MacAIErrorapt-get
- VirtualBox安裝增強功能報錯
- npm install 安裝外掛報錯NPM
- 使用 Composer 安裝 Laravel 時報錯Laravel
- 求救安裝 PHP7.4.7 報錯PHP
- npm包全域性安裝報錯NPM
- 靜默安裝oracle時報錯Oracle
- laravel11: 安裝時報錯Laravel
- linux 安裝 jupyter報錯解決Linux
- linux安裝thefuck報gcc錯誤LinuxGC
- npm 安裝 uirecorder 報錯 Unexpected tokenNPMUI
- 安裝 goGo