Tag Archives: Go get Error

[Solved] Go get Error: “The command you provide is v/v0.9.74.mod, it is not well formed.”

“The command you provide is v/v0.9.74.mod, it is not well formed.”

1. When using go get -u and go mod tidy, it is unsuccessful, as shown in the figure below

 

“`

go: github.com/baidubce/[email protected]: reading https://goproxy.baidu.com/github.com/baidubce/bce-sdk-go/@v/v0.9.74.mod: 424 Failed Dependency
pangwan@B000000392856B script% go mod tidy
go: github.com/baidubce/[email protected]: reading https://goproxy.baidu.com/github.com/baidubce/bce-sdk- go/@v/v0.9.74.mod: 424 Failed Dependency

“`

2. Click on the link to display this content

 

 

3. Solution:

 

Go down the domestic mirror

go get is really busy, just like you git down, I found it by accident,

Come to cmd to open and enter these two sentences

The first sentence is to enable the Go Modules function

The second sentence is to configure GOPROXY domestic agent address,

go env - w GO111MODULE = on 
go env - w GOPROXY = https: //goproxy.io,direct

Of course, if you want to use Alibaba Cloud to replace the following

go env - w GOPROXY = https: //mirrors.aliyun.com/goproxy/

Baidu’s

go env - w GOPROXY = https: //goproxy.baidu.com

Of course, this is to take the resources of github.com, and you will be faster. If you think about code.google.com, you may have to find if there is a mirror on github.

4. The problem is solved

Actually use these two sentences,

go env - w GO111MODULE = on 
go env - w GOPROXY = https: //goproxy.io,direct