Fabric Configuration Golang environment
Preface: Configuring Fabric environment requires some module, which is essential Golang language, I initially chose the direct command-line sudo apt install golang
installation, but later found that when performing steps later, there is a problem, it is recommended to select Extract installation, best wishes ~
- Download archive address: https: //golang.google.cn/dl/
- Unzip installed in the directory / usr / local:
sudo tar -C /usr/local -xzf go1.8beta1.linux-amd64.tar.gz
- At this point already go find folder
- Go build workspace: the need to create a folder in your home directory
cd /home
mkdir gopath
chmod 777 gopath
cd gopath
mkdir src
mkdir pkg
mkdir bin
chmod 777 src
chmod 777 bin
chmod 777 pkg
gedit ~/.bashrc
# 末尾添加以下两行
export PATH=$PATH:/usr/local/go/bin
export GOPATH=/home/gopath
# 命令生效
source ~/.bashrc
# 检查版本
go version
go env