“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/
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
Similar Posts:
- How to Solve VS Code Install Go Plug-in Error
- Gin does not contain package github.com/gin-gonic/gin/json
- Git Bash Run “ssh-add pathName” Error: “Could not open a connection to your authentication agent.”
- error loading stream: ID not found on server
- ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy [How to Solve]
- docker: Get https://registry-1.docker.io/v2/: x509: certificate is valid for *.xenahubs.net, not …
- Intellij IDEA Golang Error: no Go files in D:\basic_tool\Go\src\gosvc
- Springcloud: gateway module startup error
- failure: repodata/filelists.sqlite.bz2 from teamviewer: [Errno 256] No more mirrors to try
- [Solved] GitHub desktop push error: fatal: could not read Username for ‘https://github.com’: No such file or directory