• 部署Hyperledger Fabric报错Error: error getting chaincode bytes: failed to calculate dependencies: incomplete package: github.com/hyperledger/fabric-chaincode-go/shim


    报错1

    Error: error getting chaincode bytes: failed to calculate dependencies: incomplete package: github.com/hyperledger/fabric-chaincode-go/shim
    !!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!!
    

    apt-get install go 的版本比较低。卸载了先。然后下载go1.13.5.linux-amd64.tar.gz进行安装。

    # tar zxvf go1.13.5.linux-amd64.tar.gz
    # mv go /usr/local/
    
    # vim /etc/profile
    #set golang env
    export GOROOT=/usr/local/go
    export GOPATH=/opt/goworkspace
    export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/go/bin
    # source /etc/profile
    # go version
    go version go1.13.5 linux/amd64
    
    

    环境变量:

    # go env
    


    换成国内代理:

    # go env -w GOPROXY=https://goproxy.cn
    # export GOPROXY=https://goproxy.cn
    


    运行测试网络

    #cd /opt/fabric/fabric-samples/first-network
    # ./byfn.sh down
    #./byfn.sh up -c mychannel -s couchdb -a
    

    报错2

    Creating channel...
    + peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
    + res=1
    + set +x
    2020-03-31 09:44:51.055 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
    Error: got unexpected status: BAD_REQUEST -- error applying config update to existing channel 'mychannel': error authorizing update: error validating ReadSet: proposed update requires that key [Group]  /Channel/Application be at version 0, but it is currently at version 1
    !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
    ========= ERROR !!! FAILED to execute End-2-End Scenario ===========
    
    ERROR !!!! Test failed
    root@ubuntu:/opt/fabric/fabric-samples/first-network# 
    
    

    已经存在mychannel,之前启动的fabric network没有正常停止,如果之前执行./byfn.sh up,那么相应的执行./byfn.sh down来停止fabric network。不要直接使用docker stop 或者 docker rm 停止删除容器。
    注意,环境变量的配置添加到/etc/bash.bashrc,使不论什么用户登录都生效。

  • 相关阅读:
    交互设计必懂--开发有价值的用户体验
    优秀APP启动页的设计思维
    增加用户体验的细节--三个按钮的交互设计思维
    零基础掌握交互设计的重点笔记
    在失败的滴滴出行LOGO上谈APP设计
    是成为设计的主人?还是沦为设计的工具?
    大图标+不规则几何创造不同风格
    如何定义视觉设计规范?
    10条SKETCH的秘诀,为你提高工作的效率
    MVC过滤器详解
  • 原文地址:https://www.cnblogs.com/zoujiaojiao/p/12606909.html
Copyright © 2020-2023  润新知