go 编译缺 cannot find package “golang.org/x/

go 编译缺 cannot find package “golang.org/x/

成精的宅货ゝ
2022-07-01 / 0 评论 / 35 阅读 / 正在检测是否收录...

提示 cannot find package “golang.org/x”

尝试执行下面的命令

go get golang.org/x/net
go get golang.org/x/text
// 拉取不到就直接从GitHub镜像库拉
go get google.golang.org/x/net(无法使用,用如下命令代替)
git clone https://github.com/golang/net.git $GOPATH/src/golang.org/x/net
git clone https://github.com/golang/text.git $GOPATH/src/golang.org/x/text
cd $GOPATH/src/
go install google.golang.org/x

mkdir -p $GOPATH/src/golang.org/x
cd $GOPATH/src/golang.org/x
git clone https://github.com/golang/net.git
git clone https://github.com/golang/text.git

https://github.com/golang/net
对应: https://golang.org/x/net

2

评论

博主关闭了所有页面的评论