golang 编译时 cannot find package "golang.org/x/sys/unix"
开发好的go项目,在MAC上运行的好好的,等拿到linux上编译时,报错,找不到核心包,
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)
用共go get命令也获取不到,查资料说是被墙了,幸好github上又对应的包下载,https://github.com/golang?page=1
下载后,成功解决。
mkdir -p $GOPATH/src/golang.org/x
cd $GOPATH/src/golang.org/x
git clone https://github.com/golang/sys.git