VNTChain入门指南1——环境安装

Introduction

Environment

  • Ubuntu 18.04、Manjaro(Or other OS based on Linux release)

  • Python2

  • Docker

  • Go v1.10 (1.9+ ,version1.10 recommended)

  • Git

  • Node.js v8.11.2 or later

Say before

This document mainly help developers install most requirements for VNTChain、gvnt、bottle、vnt.js、vnt-kit.js.
I have cost a lot to do this even if I followed the official guide.Maybe there is a long time since doc updated last time.
I am GenjiLemon.GiitHub:https://github.com/GenjiLemon. Email:lemonfay{AT}qq.com.You have to keep origin URL if reprint.

Install tools

1. Node.js v8.11.2

Common way

  1. Download from Node.js Mirror

  2. Unzip (e.g tar -xf xxx.tar.gz)

  3. Add bin folder to your environment

2. go-vnt(gvnt)

Go (v1.9+) and C compile required.

Same way to README.md in Github

  1. Download

    git clone https://github.com/vntchain/go-vnt.git

  2. Switch tree

    git checkout v0.6.4-alpha.6

  3. compille

    make gvnt

    If failed , please install go v1.10 and retry.

  4. link to your environment

3. bottle

docker required

  1. Download from official docker hub

    sudo docker pull vntchain/bottle:0.6.1

    If fail,check status of docker service

  2. Check image exists

    sudo docker image ls

    maybe show like this

    REPOSITORY        TAG       IMAGE ID       CREATED       SIZE  
    vntchain/bottle   0.6.1     647ad4101419   2 years ago   1.9GB

4. vnt.js && vnt-kit.js

git、gcc 、Node.js v8.11.2 required

These javascript packages are used to delopy and smart contract.

This is the only SDK with VNTChain.We can use Nodej.js as back-end language.

  1. Init project

    npm init

  2. Download

    npm install --save https://github.com/vntchain/vnt.js.git
    npm install --save https://github.com/vntchain/vnt-kit.js.git

    If fail ,please use --python=python2.(Python2 required) like this

    npm install --save https://github.com/vntchain/vnt.js.git --python=python2
    npm install --save https://github.com/vntchain/vnt-kit.js.git --python=python2
  3. Download other requirements

    npm install --save ethereumjs-tx@1.3.7
    npm install --save ethereumjs-account

Some Experience

1. "Error: Python executable "/usr/bin/python" is v3.9.7, which is not supported by gyp." when npm install in project

Python2 required. You have to run command like this npm install --python=python2 after installing python.

2. "no required module provides package github.com/vntchain/go-vnt/internal/build: go.mod file not found" when make gvnt

This is because go version is too high. You have to install go in lower version like v1.10, and then retry.

点赞
  1. loho说道:
    Google Chrome Windows 10

    你好,我在学习vnt安装的过程中遇到了一些问题,请问方便请教一下吗

    1. lemon lemon说道:
      Firefox Ubuntu

      你好,这个入门指南是我测试过的,并且能够正常安装,你可以放心参考这份文档,如果你按照这个文档的环境来进行安装大概率是不会有问题的。请问你遇到的问题是什么?请附上你的环境

loho进行回复 取消回复

电子邮件地址不会被公开。必填项已用 * 标注