a186r avatar

EOS测试链搭建

a186r

Published: 04 Apr 2018 › Updated: 04 Apr 2018

EOS测试链搭建

之前在ubuntu上搭建问题比较多,然后在vps上搭建成功了,可能是本机的环境有问题,现在再记录一下在本机通过Docker搭建的方式

build失败比较大的概率是路径有问题,如果本机使用一键build失败,可以参考使用Docker

下载 git 仓库到本地
git clone https://github.com/EOSIO/eos.git —recursive

直接 build
个人不太建议直接 build,因为你可能由于各种系统问题导致失败,最好还是使用的 docker 方式。

ubuntu 环境下 ./build.sh ubuntu

在 docker 中 build
注意:请确保你的 docker 配置了代理,因为 build 的过程中需要访问 aws 的 cdn。同时确保你的网络足够快,不然下载要几个小时而且容易中断。

cd eos/Docker
进来之后不要直接 build,因为会报错:

COPY failed: stat /var/lib/docker/overlay2/3abc9a4b5a7ef2f3c449bd5b15378d573170c28e463062607140f88d64566ac4/merged/opt/eos/bin: no such file or directory
编辑一下 Dockerfile

COPY --from=builder /opt/eosio/bin /opt/eosio/bin

替换成

COPY --from=builder /tmp/build/install/bin /opt/eosio/bin

然后再 build:

docker build . -t eosio/eos

小技巧: 由于国内网络环境不怎么好,又或者你的电脑在 build 的过程中断网了或者其他什么原因导致退出了。这时最好的解决方法是重新 build 一下,那么可以用下面这条命令来代替上面的命令:
until docker build . -t eosio/eos; do :; done

这样一来,只要它 build 失败了,就会自动重新 build,现在只要你确保你的电脑不会自动休眠,你就可以放心地去干其他事了。

Leave EOS测试链搭建 to:

Written by

Read more #eos posts


Best Posts From a186r

We have not curated any of a186r's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From a186r