我是靠谱客的博主 烂漫眼睛,这篇文章主要介绍error when reading core config file: Config File “core“ Not Found in,现在分享给大家,希望可以做个参考。

建立chaincode包出错

复制代码
1
2
3
4
[lj@localhost test-network]$ peer lifecycle chaincode package fabcar.tar.gz --path ../chaincode/fabcar/go/ --lang golang --label fabcar_1 2022-06-03 22:27:18.115 CST [main] InitCmd -> ERRO 001 Fatal error when initializing core config : error when reading core config file: Config File "core" Not Found in "[/home/lj/fabric/scripts/fabric-samples/test-network]"

解决方法:
peer的可执行二级制文件在fabric-sample的bin文件夹中。使用如下命令添加Peer到CLI命令路径中

复制代码
1
2
3
4
cd ../../../test-network export PATH=${PWD}/../bin:$PATH

还需要设置指向fabric-samples中core.yaml的FABRIC_CFG_PATH

复制代码
1
2
export FABRIC_CFG_PATH=$PWD/../config/

然后再次执行该语句

运行结果:这次没有报错

复制代码
1
2
3
4
5
[lj@localhost test-network]$ export PATH=${PWD}/../bin:$PATH [lj@localhost test-network]$ export FABRIC_CFG_PATH=$PWD/../config/ [lj@localhost test-network]$ peer lifecycle chaincode package fabcar.tar.gz --path ../chaincode/fabcar/go/ --lang golang --label fabcar_1 [lj@localhost test-network]$

最后

以上就是烂漫眼睛最近收集整理的关于error when reading core config file: Config File “core“ Not Found in的全部内容,更多相关error内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(67)

评论列表共有 0 条评论

立即
投稿
返回
顶部