8

golang 不翻墙安装golang.org/x/net

 2 years ago
source link: https://studygolang.com/articles/10797?fr=sidebar
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

golang 不翻墙安装golang.org/x/net

liuyg · 2017-08-28 02:35:03 · 21341 次点击 · 预计阅读时间 1 分钟 · 大约8小时之前 开始浏览    
这是一个创建于 2017-08-28 02:35:03 的文章,其中的信息可能已经有所发展或是发生改变。

下载安装golang.org/x/net其实网上有很多的文章,但总的归来是有两种:

为了使包的导入方式不变,我们需要在src目录下面构造目录结构
$mkdir -p $GOPATH/src/golang.org/x/
$cd $GOPATH/src/golang.org/x/
$git clone https://github.com/golang/net.git net
$go install net
执行go install之后没有提示,就说明安装好了。

上面的方法参考:[当“go get”遇到墙时,我们该如何解决?]

有人说 https://github.com/golang/nethttps://golang.org/x/net 是一样的,
被墙了没办法 go get golang.org/x/net 了。
可以git pull github下的到 文件夹
然后 go install golang.org/x/net/... 来安装

我一般采用方法一来解决问题,方法二也试过,貌似也没问题。

[获取授权]


有疑问加站长微信联系(非本文作者)

280

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK