报错信息:
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
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的版本
我的原本go版本:
go1.18.1 linux/amd64
换成15.1的版本
1、下载安装包:
curl -L https://golang.google.cn/dl/go1.15.linux-amd64.tar.gz -o go1.15.linux-amd64.tar.gz
2、解压:
sudo tar -C /usr/local -xzf go1.15.linux-amd64.tar.gz
3、修改配置文件
vim ~/.bashrc
在文件后添加配置
export GOPATH=$HOME/go
export GOROOT=/usr/local/go
export PATH="/usr/local/go/bin:$PATH"
4、立即刷新配置
source ~/.bashrc
5、重新安装
peer lifecycle chaincode install mycc.tar.gz
6、成功了!
|