go get 不成功解决方案 "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、使用go get -u 和go mod tidy时,不成功,如下图所示

go get 不成功解决方案 "The command you provide is v/v0.9.74.mod, it is not well formed."

 

``` 

go: github.com/baidubce/bce-sdk-go@v0.9.74: 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/bce-sdk-go@v0.9.74: reading https://goproxy.baidu.com/github.com/baidubce/bce-sdk-go/@v/v0.9.74.mod: 424 Failed Dependency

```

2、点击连接,显示这个内容

go get 不成功解决方案 "The command you provide is v/v0.9.74.mod, it is not well formed."

 

 

3、解决方案:

 

走下国内镜像吧

go get 确实是很忙,跟你git下来一样,我无意中找到的,

来 cmd打开 输入这两句

第一句是 启用Go Modules 功能

第二句是 配置GOPROXY 国内代理地址,

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

当然 如果你要用阿里云的 换成下面

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

百度的

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

当然 这个是走 github.com的资源会快点,想code.google.com之类的 你可能要去找下 github上有没有镜像了

4、问题得到解决

实际用这两句,

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

go get 不成功解决方案 "The command you provide is v/v0.9.74.mod, it is not well formed."

 

 

 

 

转载自https://blog.csdn.net/xuelang532777032/article/details/108584203

 

go get 不成功解决方案 "The command you provide is v/v0.9.74.mod, it is not well formed."

上一篇:jquery判断是否出现滚动条


下一篇:WebService入门Demo