我运行了脚本./network.sh deployCC
,然后它无法将其部署到网络上(Fabric 2.0),这是错误:
deploying chaincode on channel 'mychannel'
Vendoring Go dependencies ...
~/Desktop/Fabric/fabric-samples/chaincode/fabcar/go
~/Desktop/Fabric/fabric-samples/test-network
go: unknown subcommand "mod"
Run 'go help' for usage.
~/Desktop/Fabric/fabric-samples/test-network
Finished vendoring Go dependencies
Using organization 1
++ peer lifecycle chaincode package fabcar.tar.gz --path
../chaincode/fabcar/go/ --lang golang --label fabcar_1
++ res=1
++ set +x
Error: error getting chaincode bytes: listing deps for pacakge
../chaincode/fabcar/go/ failed: exit status 2
!!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed
!!!!!!!!!!!!!!!!
ERROR !!! Deploying chaincode failed
问题出在您安装的Go软件包中。您安装了哪个版本?从此处安装最新版Go的理想方法。Go
如果您使用的是ubuntu,请不要进行apt安装。
首先删除安装的apt
$ sudo apt-get remove go
从站点https://golang.org/dl/下载Linux的tar文件450
执行命令$ sudo tar -C / usr / local -xzf