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

今天安装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,就安装成功了。

文章来自:http://www.cnblogs.com/weifeng1463/p/7488862.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3