背景
安装Gin时,通过go get下载并安装gin软件包
$ go get -u github.com/gin-gonic/gin
- 1
问题
package golang.org/x/sys/unix: unrecognized import path "golang.org/x/sys/unix" (https fetch: Get https://golang.org/x/sys/unix?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
- 1
解决
- golang 在 github 上建立了一个镜像库,下载github上的镜像库放入GOPATH下即可
mkdir -p $GOPATH/src/golang.org/x cd $GOPATH/src/golang.org/x git clone https://github.com/golang/sync.git git clone https://github.com/golang/crypto.git git clone https://github.com/golang/sys.git
- 1
- 2
- 3
- 4
- 5
- 重新执行
go get