解决golang.org/x包无法下载的问题

栏目: Go · 发布时间: 6年前

内容简介:由于Google相关的包无法直接下载,可以使用如果方式下载下来,然后创建软连接或者修改文件夹名称来解决:第一步:通过查看

由于Google相关的包无法直接下载,可以使用如果方式下载下来,然后创建软连接或者修改文件夹名称来解决:

第一步:

git clone https://github.com/golang/net.git $GOPATH/src/github.com/golang/net
git clone https://github.com/golang/sys.git $GOPATH/src/github.com/golang/sys
git clone https://github.com/golang/tools.git $GOPATH/src/github.com/golang/tools
git clone https://github.com/golang/lint.git $GOPATH/src/github.com/golang/lint
...

通过查看 https://github.com/golang 可以获取更多的信息

第二步:

将net、sys、tools三个文件夹放到 $GOPATH/src/golang.org/x 目录下。或者 Linux 下可以创建软连接:

ln -s $GOPATH/src/github.com/golang $GOPATH/src/golang.org/x

说明:上述通过环境变量指示的路径如果有问题,可以使用其他路径表式(如绝对路径)


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Artificial Intelligence

Artificial Intelligence

Stuart Russell、Peter Norvig / Pearson / 2009-12-11 / USD 195.00

The long-anticipated revision of this #1 selling book offers the most comprehensive, state of the art introduction to the theory and practice of artificial intelligence for modern applications. Intell......一起来看看 《Artificial Intelligence》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

SHA 加密
SHA 加密

SHA 加密工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器