Failed to Download the go get golang.org/x Package
Symptom
The go get golang.org/x command fails to be executed. The error information is as follows:
1 | Get "https://proxy.golang.org/golong.org/x/cryptp/@v/v0.0.0-20200622213623-75b288015ac9.mod": dial tcp 34.54.4.17:443: i/o timeout |
Key Process and Cause Analysis
None
Conclusion and Solution
- Configure Go-related environment variables and use a proxy to resolve the network access timeout problem.
1vi /etc/profile - Press i to enter the insert mode and set the following environment variables:
1 2
export GOPROXY=https://goproxy.io export GO111MODULE=on
- Press Esc, type :wq!, and press Enter to save the file and exit.
Parent topic: Troubleshooting