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

Install the gin framework today, first download gin, the command is as follows:

go get github.com/mattn/go-sqlite3


The result is an error:

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.)

The method of operation is:

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

After installing this net package, and then installing go-sqlite3, the installation is successful.

Guess you like

Origin blog.csdn.net/zhangge3663/article/details/108282947