背景

在centos7编译mkcert报错

yum install nss-tools
git clone https://github.com/FiloSottile/mkcert && cd mkcert
go build -ldflags "-X main.Version=$(git describe --tags)"

报错golang unrecognized import path "golang.org/x/net" 

go get层面增加代理

go 1.11版本新增了 GOPROXY 环境变量,go get会根据这个环境变量来决定去哪里取引入库的代码

 export GOPROXY=https://goproxy.io

再次编译

go build -ldflags "-X main.Version=$(git describe --tags)"

golang unrecognized import path "golang.org/x/net"  完美解决方案

 

 golang unrecognized import path "golang.org/x/net"  完美解决方案

 

 

转载自:https://blog.csdn.net/snowin1994/article/details/88358836

相关文章:

  • 2021-10-10
  • 2022-01-11
  • 2021-12-19
  • 2021-05-24
  • 2022-12-23
  • 2022-12-23
  • 2022-02-17
猜你喜欢
  • 2021-06-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案