-->

signed

QiShunwang

“诚信为本、客户至上”

fabric 2.0 test-network 链码部署踩的坑 github.com/golang/protobuf@v1.3.2: is explicitly required in go.mod

2021/6/3 14:33:50   来源:

执行命令

./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-go -ccl go

报错信息

+ res=1
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: inconsistent vendoring in /chaincode/input/src:
	github.com/golang/protobuf@v1.3.2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/hyperledger/fabric-chaincode-go@v0.0.0-20200424173110-d7076418f212: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/hyperledger/fabric-contract-api-go@v1.1.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/hyperledger/fabric-protos-go@v0.0.0-20200424173316-dd554ba3746e: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/stretchr/testify@v1.5.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt


解决办法
将链码包中go.mod里面的go 1.14改为 go 1.13
在这里插入图片描述