遇到了cannot find package "golang.org/x/的报错

安装github.com/sirupsen/logrus遇到错误:

vendor/github.com/sirupsen/logrus/terminal_check_bsd.go:5:8: cannot find package "golang.org/x/sys/unix" in any of:

golang.org 官网网络限制问题,需要翻墙。

不翻墙的解决方法:

mkdir -p $GOPATH/src/golang.org/x
cd $GOPATH/src/golang.org/x
git clone https://github.com/golang/sys.git
发布了49 篇原创文章 · 获赞 8 · 访问量 14万+

猜你喜欢

转载自blog.csdn.net/wsliangjian/article/details/97253595