Fabric遇到的问题&解决办法(持续更新)

1. fabric2.0.0链码打包失败

Error: error getting chaincode bytes: failed to calculate dependencies: incomplete package: github.com/hyperledger/fabric-contract-api-go/contractapi
!!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========

原因是golang版本太新,我装的是1.13.14,换成1.13.4问题解决。

2. fabric2.x链码打包时go mod下载依赖超时

如果不指定代理,go mod默认从这个网址下载依赖,速度很慢,甚至下载失败

https://proxy.golang.org

通过环境变量指定阿里云的代理,下载速度会很快

export GOPROXY=https://mirrors.aliyun.com/goproxy/

你可能感兴趣的:(Fabric,区块链)