码迷,mamicode.com
首页 > Web开发 > 详细

go get报错unrecognized import path “golang.org/x/net/context”…

时间:2017-09-07 13:34:48      阅读:506      评论:0      收藏:0      [点我收藏+]

标签:http   tool   lis   man   dial   sla   art   下载   text   

今天安装gin框架,首先下载gin,命令如下:
go get github.com/mattn/go-sqlite3


结果报错:

package golang.org/x/net/context: unrecognized import path "golang.org/x/net/context" (https fetch: Get https://golang.org/x/net/context?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

操作的办法就是:

1
2
3
4
$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

安装了这个net包,然后再去安装go-sqlite3,就安装成功了。

go get报错unrecognized import path “golang.org/x/net/context”…

标签:http   tool   lis   man   dial   sla   art   下载   text   

原文地址:http://www.cnblogs.com/weifeng1463/p/7488862.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!