執行以下指令安裝鏈碼時報錯
peer lifecycle chaincode install basic.tar.gz
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Error returned from build: 1 "go: github.com/golang/protobuf@v1.3.2: Get "https://proxy.golang.org/github.com/golang/protobuf/@v/v1.3.2.mod": dial tcp 172.217.24.17:443: connect: connection refused

解決方案,到鏈碼所在的目錄下提前下載依賴包
cd fabric-samples/asset-transfer-basic/chaincode-go
更改go代理
go env -w GOPROXY=https://goproxy.io,direct
go env -w GO111MODULE=on
go mod vendor
重新打包智能合約并安裝鏈碼
peer lifecycle chaincode package basic.tar.gz --path ../asset-transfer-basic/chaincode-go/ --lang golang --label basic_1.0
peer lifecycle chaincode install basic.tar.gz

成功解決Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Error returned from build: 1 "go: github.com/golang/protobuf@v1.3.2: Get "https://proxy.golang.org/github.com/golang/protobuf/@v/v1.3.2.mod": dial tcp 172.217.24.17:443: connect: connection refused的問題,
歡迎小伙伴的討論,若有問題請在評論區評論或私信,謝謝你,
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/226928.html
標籤:區塊鏈
上一篇:哇塞的Docker——vscode遠程連接Docker容器進行專案開發(一)
下一篇:盒子模型的組成
