安装
maxminddb-golang错误:
dill@ubuntu-vm:~/workspace/go/src/github.com$ go get github.com/oschwald/maxminddb-golang
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.org/x/sys/unix:
dill@ubuntu-vm:~/workspace/go/src$ go get github.com/golang/sys
又报错 :can't load package: package github.com/golang/sys:
no buildable Go source files in /home/dill/workspace/go/src/github.com/golang/sys
解决办法:
- git clone https://github.com/golang/sys.git
- mkdir -p golang.org/x/sys/unix ($GOPATH/src目录下)
- cp -r unix/ golang.org/x/sys/($GOPATH/src目录下)
- git clone https://github.com/golang/sys.git
2. 重新go get github.com/oschwald/maxminddb-golang 竟然好了,不知道原理,先记下吧!:+)