Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Resolve the problem that the golang.org/x package cannot be downloaded

Shulou Source: shulou.com Published: 2022-06-03 05:42:25 11月24日 Update

Since Google-related packages cannot be downloaded directly, you can use if to download them, and then create a soft connection or modify the folder name to solve the problem:

Step one:

Git clone https://github.com/golang/net.git $GOPATH/src/github.com/golang/netgit clone https://github.com/golang/sys.git $GOPATH/src/github.com/golang/sysgit clone https://github.com/golang/tools.git $GOPATH/src/github.com/golang/toolsgit clone https://github.com/golang/lint.git $GOPATH/src/github.com/golang/lint...

You can get more information by viewing https://github.com/golang

Step 2:

Put the net, sys, and tools folders in the $GOPATH/src/golang.org/x directory. Or you can create a soft connection under Linux:

Ln-s $GOPATH/src/github.com/golang $GOPATH/src/golang.org/x

Note: if there is a problem with the above path indicated by the environment variable, you can use other path tables (such as absolute path)

.

Tags: Path file folder problem three information variable name indication method more environment directory Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB OPPO Reno Docker Linux MySQL