Spectrum chain Development--MAC development environment construction

Source: Internet
Author: User
Tags install go

This article describes how to build a spectrum development environment in a MAC OS x environment.

Environment configuration

Installing Golang

brew install go

Configuring Golang Environment variables

vim ~/.bash_profile

Add Gopath under ~/.bash_profile

#replace ~/go_project with your pathexport GOPATH=~/go_project   export PATH=.:$PATH:$GOPATH:$GOPATH/bin

Create a src,pkg,bin directory under Gopath

mkdir -p $GOPATH/bin $GOPATH/pkg $GOPATH/src

Detect GO Environment

source ~/.bash_profilego env

Install Git

brew install git

Source code Compilation

Download the latest source to Gopath

mkdir -p $GOPATH/src/github.com/SmartMeshFoundationcd $GOPATH/src/github.com/SmartMeshFoundationgit clone https://github.com/SmartMeshFoundation/Spectrum

Compiling SMC

cd $GOPATH/src/github.com/SmartMeshFoundation/Spectrum/go install -v ./cmd/smc

After the successful compilation, the path of the SMC executable file: $GOPAT/BIN/SMC
Test SMC

smc console

About the IDE

The IDE that is commonly used under Mac has Golion,vscode,govim, etc., can choose the IDE according to personal preference.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.