Golang Environment Construction
export GOROOT=/usr/local/goexport GOPATH=/Users/apple/go-workspaceexport GOBIN=$GOPATH/bin
Description
- /usr/local/go: Is the path of the local Golang installation
- /users/apple/go-workspace: Is the path of the Golang project that you set up
Then press "ESC" key, then ": Wq", then press ENTER to save, then execute the following command, reload let the configuration take effect:
source ~/.bash_profile
Compile the nebula chain to download the source code
# 进入工作目录mkdir -p $GOPATH/src/github.com/nebulasiocd $GOPATH/src/github.com/nebulasio# 下载源码git clone https://github.com/nebulasio/go-nebulas.git# 进入项目目录cd go-nebulas# 切换到最稳定的master分支git checkout master
Installing Rocksdb dependent libraries
brew install rocksdb
Install the Go Dependency Library installation DEP Tool
In Go-nebulas, the three-party library of Go is managed by DEP. Version requirement: >=0.3.1
# 安装brew install dep# 升级brew upgrade dep
Download go tri-party Library
We switch to the Go-nebulas project root directory and use DEP to download the three-party library.
cd $GOPATH/src/github.com/nebulasio/go-nebulasmake dep
You can also download a library-dependent compression package directly: http://ory7cn4fx.bkt.clouddn.com/vendor.tar.gz,
Then copy to $gopath/src/github.com/nebulasio/go-nebulas and perform the decompression:
tar zxf vendor.tar.gz
Installing the chrome V8 dependency Library
Nebula virtual machines now rely on Chrome's V8 engine
cd $GOPATH/src/github.com/nebulasio/go-nebulasmake deploy-v8
Compiling the executable file
cd $GOPATH/src/github.com/nebulasio/go-nebulasmake build
Compile successfully, the following information appears:
Nebula Chain Intelligent Contract Development (II): Mac installation Nebula Chain