Rate This Document
Findability
Accuracy
Completeness
Readability

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

  1. Configure Go-related environment variables and use a proxy to resolve the network access timeout problem.
    1
    vi /etc/profile
    
  2. Press i to enter the insert mode and set the following environment variables:
    1
    2
    export GOPROXY=https://goproxy.io
    export GO111MODULE=on
    
  3. Press Esc, type :wq!, and press Enter to save the file and exit.