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
- go1.18 安裝godoc報錯Go
- go get 拉取擴充套件報錯Go套件
- go get報錯connect: connection refusedGo
- go get 安裝gitlab私有包GoGitlab
- Go Gin安裝解決國內go get 方式安裝超時Go
- MySQL 5.7.17 安裝報錯SSL error: Unable to get private key fromMySqlError
- etcd套路(三)etcd的安裝
- 安裝配置ETCD
- go get 安裝 第三方包Go
- 安裝ionic 報錯 安裝canvas報錯 解決辦法Canvas
- Go 解決國內go get安裝包超時問題Go
- nginx安裝報錯Nginx
- 安裝VUE報錯Vue
- snipMate安裝後報錯
- 安裝heapster報錯
- GO get 安裝特別慢的問題以及 goland 載入 go moduleGoLand
- 二進位制檔案安裝安裝etcd
- freeipa server安裝報錯Server
- pip 安裝 grpcio 報錯RPC
- CDC linux安裝報錯Linux
- RPM 包安裝報錯
- 安裝mysql 5.5.14 報錯MySql
- Oracle安裝報錯syntax errorOracleError
- 安裝RAC 報錯 集錦
- Ruby----RMagick安裝報錯
- 安裝ElasticSearch-6.2.3所遇到的安裝報錯Elasticsearch
- go對get、post請求封裝Go封裝
- Composer 安裝 Laravel/passport 報錯LaravelPassport
- 求救安裝 PHP7.4.7 報錯PHP
- 安裝grid軟體報錯
- Linux安裝virtualenvwrapper報錯LinuxAPP
- npm包全域性安裝報錯NPM
- CentOS release 6.5 yum安裝報錯CentOS
- 安裝sass報錯解決方案
- vue安裝babel依賴報錯VueBabel
- 安裝MYSQL ODBC5.3報錯MySql
- 安裝OUD報錯,unsupported classversion 51.0