Preparing the Hoverfly Compilation Environment
- Configure Go environment variables.
- Open the /etc/profile file.
1vi /etc/profile - Add the following content to the file. Save the file and exit.
export GOPATH=/root/go; export GOROOT=/usr/lib/golang; export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
- Make the modified environment variables take effect.
1source /etc/profile
- Open the /etc/profile file.
- Install Gox, Logrus, GOPROXY and Glide.
1git config --global http.sslVerify false
1go get github.com/mitchellh/gox;
1go get github.com/Sirupsen/logrus;
1go get github.com/rusenask/goproxy;
1go get github.com/Masterminds/glide;
During the installation, if an error is reported stating "unrecognized import path 'golang.org/x/sys/unix'", see Configuring GOPROXY Environment Variables.
- View the Glide version.
glide -v

If the command output contains the error "command not found", run the reboot command to reboot the server.
- Modify the Git configuration file.
- Open the ~/.gitconfig file.
1vi ~/.gitconfig - Replace configured URLs with the new ones. Save the configuration and exit.
[url "https://gitlab.com/cznic/cc.git"] insteadOf = https://gitlab.com/cznic/cc [url "https://gitlab.com/cznic/golex.git"] insteadOf = https://gitlab.com/cznic/golex [url "https://gitlab.com/cznic/mathutil.git"] insteadOf = https://gitlab.com/cznic/mathutil [url "https://gitlab.com/cznic/strutil.git"] insteadOf = https://gitlab.com/cznic/strutil [url "https://gitlab.com/cznic/xc.git"] insteadOf = https://gitlab.com/cznic/xc
- Open the ~/.gitconfig file.
Parent topic: Compiling and Installing Hoverfly