问题:mac Mojave系统,之前按照官网教程https://hyperledger-fabric.readthedocs.io/en/latest/build_network.html
搭建过fabric网络一次,sucess。后面估计是删除了东西,导致网络启动不了。
出现问题可能原因:按报错提示,fabirc-sample的bin文件缺失或当前版本可能与docker容器里版本不匹配。
解决方法:
第一步,卸载重新安装docker,卸载Nodejs,重新安装node -v 8.9.x npm -v 5.5.1实测也可以build first network(官方推荐5.6.0)
node 8.9.0 对应的 npm 5.5.1,若安装npm 5.6.0 ,可从https://nodejs.org/en/blog/release/v8.9.4/下载(google搜索)
第二步,重新执行脚本
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 1.2.0 1.2.0 0.4.10
1.2.0 1.2.0 可以按版本进行替换,这里指的是fabric 1.2.0
注意:这个脚本将https://hyperledger-fabric.readthedocs.io/en/latest/install.html 官网的四个操作封装了,执行脚本可完成如下四个操作
- If needed, clone the hyperledger/fabric-samples repository
- Checkout the appropriate version tag
- Install the Hyperledger Fabric platform-specific binaries and config files for the version specified into the /bin and /config directories of fabric-samples
- Download the Hyperledger Fabric docker images for the version specified
推荐:在搜索bug时候,中文版觉得简书沙漠中的猴写的不错:
简介
当前主机信息: Ubuntu16.04
x86_64
root@JDu4e00u53f7:~# uname -a
Linux JDu4e00u53f7 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
我们需要准备的环境有:
- cURL
- Docker Compose
- Docker
- Golang
- Nodejs
安装
安装cURL
sudo apt-get install curl //Ubuntu系统一般默认会安装
安装Docker
Hypreledger Fabric1.2 要求Docker的版本最低为
Docker 17.06.2-ce
安装方法请参考:https://www.jianshu.com/p/6ca5eab32679
安装Docker-Compose
Hypreledger Fabric1.2 要求Docker-Compose的版本最低为
1.14.0
安装方法请参考:https://www.jianshu.com/p/24e56729d19d
安装Golang
Hypreledger Fabric1.2 要求Golang的版本为
1.10.x
。所以我选择安装go 1.10.1版本
。
安装方法请参考:https://www.jianshu.com/p/9adae64b715f
安装node
Hypreledger Fabric1.2 要求node的版本最低要求是
8.9.x
,但是9.x版本是不支持的。
npm的要求是5.6.0
安装方法参考:https://www.jianshu.com/p/472adb1e975e
作者:沙漠中的猴
链接:https://www.jianshu.com/p/4be6468bd132
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。