1.安装环境(一定要centos7以上):
2.创建eos目录 mkdir /home/blockchain/&& cd /home/blockchain/
3.下载eos源码
- git clone https://github.com/EOSIO/eos —recursive 下载并安装eos代码
git clone 命令传递 —recursive 选项,它就会自动初始化并更新仓库中的每一个子模块
- 修改eos脚本
由于我的台式机配置比较低,eos脚本编译需要7G内存,所以在编译之前需要修改vim /home/blockchain/eos/scripts/eosio_build_centos.sh文件,将7修改为1G
- 编译
如果进程顺利的情况下需要大概2个小时左右,但是由于我的网络环境不好,在下载安装Cmake的时候,经常下载失败,需要多重复执行几次,如果可以的话最好可以科学上网编译4.可能出现的问题
- 1.就是编译的时候,硬件不符合要求,这个需要修改脚本
-
2.在编译下载cmake比较慢,需要耐心等待,甚至是在编译cmake是出错 ‘make: the ‘-j’ option requires a positive integer argument’,我的解决办法是进入 cd /root/opt/cmake-3.10.2,手动编译
-
3 .编译的过程中出现类似如下错误
make: the ‘-j’ option requires a positive integer argument
Usage: make [options] [target] ..
This program built for x86_64-redhat-linux-gnu
Report bugs to [email protected]
Error compiling secp256k1-zkp.
Exiting now.
解决方法
最简单的方法就是进入 vim /home/blockchain/eos/scripts/eosio_build_centos.sh将