在Hyperledger Fabric中启动网络失败



我正在学习本教程,并尝试构建网络。但是,当我尝试运行以下命令时:./ byfn.sh -m up,但是我收到以下错误:

Error: failed to create deliver client: failed to load config for OrdererClient: unable to load orderer.tls.rootcert.file: open /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem: no such file or directory

谁能帮我?非常感谢! 在此处输入图像描述

我面临着与您相同的问题

Error: failed to create deliver client: failed to load config for OrdererClient: unable to load orderer.tls.rootcert.file: open /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem: no such file or directory

就我而言,我输入的是我的本地路径"/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto"这条路径。所以我只是从终端复制了我的机器路径并附加到文件路径,这解决了我的问题。

希望这对您的情况也有帮助。

我通过更正我的 GOPATH 环境变量来克服这一点。 我在MacOS High Sierra(10.13.5(上运行,按照教程引导我设置:

export GOPATH=$HOME/go

其中我的$HOME环境变量设置为

/Users/<username>

我的 Go 安装不在那里。我通过运行以下命令更正了我的 GOPATH:

which go
export GOPATH=<which_go_output>

我将第二行复制到我的.bash_profile并删除了以下行,本教程还建议:

export PATH=$PATH:$GOPATH/bin

我也观察到了同样的错误。终于知道我没有使用./byfn.sh generate../bin/cryptogen generate --config=./crypto-config.yaml

在启动网络之前,请确保在本地计算机crypto-config目录中生成上述证书。

最新更新