前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >一种eos3.0升级到eos4.x的的方法

一种eos3.0升级到eos4.x的的方法

作者头像
rectinajh
发布2018-06-13 14:52:58
5060
发布2018-06-13 14:52:58
举报

6月eos主网即将上线,eos版本迭代飞快,刚刚装好了eos3.0,4.0,4.1,4.2就出来了。 eos部署是一件极其耗时的操作,每次删掉重新安装就淡疼了。 升级的中心思想是删除build文件夹,然后git pull,然后重新build。

代码如下:

代码语言:javascript
复制
ubuntu@VM-0-7-ubuntu:~/eos$ rm -rf build/
ubuntu@VM-0-7-ubuntu:~/eos$ ls
circle.yml  debian    eos.doxygen.in  HEADER       mesh.dot                README.md  star.dot       testnet.template
 CMakeLists.txt Docker    eosio_build.sh  Jenkinsfile  mesh.png    ring.dot   star.png       tests
CMakeModules    docs      eos-logo.png    libraries    plugins   ring.png   testnet-diagrams.sh  tools
contracts   Doxyfile  externals   LICENSE.txt  programs  scripts    testnet.md
ubuntu@VM-0-7-ubuntu:~/eos$ git submodule update --init --recursive
ubuntu@VM-0-7-ubuntu:~/eos$ git pull
remote: Counting objects: 28711, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 28711 (delta 3661), reused 3668 (delta 3656), pack-    reused 25035
Receiving objects: 100% (28711/28711), 21.99 MiB | 1.02 MiB/s, done.
Resolving deltas: 100% (26670/26670), completed with 448 local objects.
From https://github.com/eosio/eos

create mode 100644 unittests/special_accounts_tests.cpp
 create mode 100644 unittests/tic_tac_toe_tests.cpp
 create mode 100644 unittests/wasm_tests.cpp
ubuntu@VM-0-7-ubuntu:~/eos$ ls
circle.yml  debian    eos.doxygen.in      externals    libraries        plugins    ring.png  testnet-diagrams.sh  tools
CMakeLists.txt  Docker    eosio_build.sh      governance       LICENSE.txt  programs   scripts   testnet.md       tutorials
CMakeModules    docs      eos-logo.png        HEADER         mesh.dot   README.md  star.dot  testnet.template     unittests
contracts   Doxyfile  EXCHANGE_README.md  Jenkinsfile      mesh.png ring.dot   star.png  tests
ubuntu@VM-0-7-ubuntu:~/eos$ ./eosio_build.sh 

git submodules are not up to date.
Please run the command 'git submodule update --init --recursive'.
ubuntu@VM-0-7-ubuntu:~/eos$ git submodule update --init --    recursive
  Submodule path 'externals/binaryen': checked out     '579f3a099c286a45f58ea1ffc7bf671c415be0a6'
Submodule path 'libraries/appbase': checked out '50dc015b2f0e25c0cd01cf520245da23c0ed446b'
Submodule path 'libraries/chainbase': checked out 'b40a1ec99ee0eb16e28ee1c1a9577f1af7d48b84'
ubuntu@VM-0-7-ubuntu:~/eos$ ./eosio_build.sh 

Beginning build version: 1.2
Mon May 28 17:00:36 UTC 2018
User: ubuntu
git head id: 07a6798584d053ed6061bd892879c6c886ba104e
Current branch: master

ARCHITECTURE: Linux

OS name: Ubuntu
OS Version: 16.04
CPU speed: 2394.454Mhz
CPU cores: 2
Physical Memory: 7855 Mgb
Disk install: /dev/vda1
Disk space total: 49G
Disk space available: 36G

然后 cd build/contracts/,在make

代码语言:javascript
复制
ubuntu@VM-0-7-ubuntu:~/eos$ cd build/contracts/
ubuntu@VM-0-7-ubuntu:~/eos/build/contracts$ make

进入到eos文件夹里在运行:

代码语言:javascript
复制
 ubuntu@VM-0-7-ubuntu:~/eos$ ./eosio_build.sh 

然后试试

代码语言:javascript
复制
  ubuntu@VM-0-7-ubuntu:~/eos$ cd build/
  ubuntu@VM-0-7-ubuntu:~/eos/build$ sudo make install

最后跑一下测试例子:

代码语言:javascript
复制
 export PATH=${HOME}/opt/mongodb/bin:$PATH
/usr/bin/mongod -f /home/ubuntu/opt/mongodb/mongod.conf &
cd /home/ubuntu/eos/build; make test
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018.05.29 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档