成功解决: \“exec: \\\“chaincode\\\“: executable file not found in $PATH\“: unknown“
·
具体报错内容如下:OCI runtime create failed: container_linux.go:349: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\": unknown"
Hyperledger Fabric2.0初始化链码时遇到如上错误
尝试了很多办法都未得到解决,最后猜想可能跟智能合约的依赖包有关,之前为了提速使用的是
go env -w GOPROXY=https://goproxy.cn
国内代理来配置依赖,后来改回了原来的代理,删除原来的依赖包并重新下载,问题就得到了解决
go env -w GOPROXY=https://goproxy.io,direct
配置好代理后就开始根据自动生成的go.mod下载依赖包至vendor中
go env -w GO111MODULE=on
go mod init
go mod vendor
原本只有manufacture.go一个文件,成功执行如上代码后生成go.mod、go.sum和vendor。vendor放的是该智能合约(manufacture.go)的依赖包。

配置完成,启动自动化脚本
./byfn.sh up
搞定
有点小尴尬,之前出问题的图忘记截图了,希望能解决同样的问题,欢迎讨论!
更多推荐
所有评论(0)