Configuring GOPROXY Environment Variables
Symptom
When installing Glide, an error is reported stating "unrecognized import path 'golang.org/x/sys/unix'."

Procedure
- View the Go version.
1go version
Go 1.11 and later have GOPROXY environment variables. If you set the environment variables, the proxy address specified by the environment variables is used for downloading the Go source code, instead of directly downloading the source code from the code library.
- Open the profile file.
1vi /etc/profile - Add the following content to the file. Save the file and exit.
1 2
export GOPROXY=https://goproxy.io export GO111MODULE=on
- Make the environment variables take effect.
source /etc/profile
- View the environment variables.
1 2
echo $GOPROXY echo $GO111MODULE
Parent topic: Troubleshooting