dongyuntao2000
2016-08-30 05:14 阅读 60
已采纳

链码示例中没有可构建的Go源文件错误

I have just started learning GO and ChainCode. I have followed the instructions mentioned in the following URL to learn programming chain code

https://github.com/IBM-Blockchain/learn-chaincode

i have setup the code and ran the command $ go build ./

but i am getting the following error

../../../hyperledger/fabric/core/crypto/attributes/attributes.go:28:2: no buildable Go source files in /home/serveradmin/gowork/src/github.com/hyperledger/fabric/core/crypto/attributes/proto

let me know, if anyone come across this error and fixed it

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

3条回答 默认 最新

  • 已采纳
    dsfhe34889 dsfhe34889 2016-08-31 08:40

    Actually it was a bug after the update and it has already been addressed. As per the following, https://github.com/hyperledger/fabric/commit/af5f75d3fb52ee5cd607abfef4324fc049153268.

    Revert "Upgrade go protobuff from 3-beta to 3" This reverts commit a98c59a.

    We are experiencing several failures related to this merge, so lets revert it for now and re-group

    Please pull the latest version and it will work smoothly

    点赞 评论 复制链接分享
  • dsue14118 dsue14118 2016-08-30 05:43

    You are running go build from the wrong directory. You are in $GOPATH/src/github.com/hyperledger/fabric/core/crypto/attributes/proto but you should be in $GOPATH/src/github.com/<yourgithubid>/learn-chaincode/start. Check out the instructions.

    点赞 评论 复制链接分享
  • duanlanqian9974 duanlanqian9974 2016-08-30 20:07

    @Dinesh, you need to make protos in order for the file to be created in that folder (core/crypto/attributes/proto)

    点赞 评论 复制链接分享

相关推荐