Installation (Golang)

Go package

Download and install Go. We recommend to use go v1.18.0+ to use the binary efficiency.

Install manually

Download go version 1.18.6 or newer here and unzip file.

Create go-src at home directory and move downloaded file to go-src:

mkdir ~/go-src
mv ~/Download/go ~/go-src/go1.18.6
# Rename go to respective version

Link go-src as goroot

ln -s ~/go-src/go1.18.6/ ~/goroot

Now we will export path of go from zshrc or bashrc

vim ~/.zshrc
#or
vim ~/.bashrc 

Add path as below to file .bashrc or .zshrc

export GOPATH=/usr/local/go
export PATH=$PATH:$GOPATH/bin
# This variable should already exist, but if it's not we have to add it

# Below this is must have variable
export GOPATH=~/go
export GOROOT=~/goroot
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

Update bash file

source ~/.zshrc
# or 
source ~/.bashrc

Go version

To make sure go version is installed appropriately type

go version
# go version go1.18.6 darwin/amd64 <-- or maybe different but we focus only version of go

Google cloud utils (optional)

In order to download chain binary you need to install gsutil here.

Last updated