登录
首页 >  Golang >  Go问答

在Ubuntu上如何安装并编译gomuk

来源:stackoverflow

时间:2024-02-18 22:54:25 256浏览 收藏

“纵有疾风来,人生不言弃”,这句话送给正在学习Golang的朋友们,也希望在阅读本文《在Ubuntu上如何安装并编译gomuk》后,能够真的帮助到大家。我也会在后续的文章中,陆续更新Golang相关的技术文章,有好的建议欢迎大家在评论留言,非常感谢!

问题内容

尝试编译 gomuks,按照其安装说明,我收到此错误:

$ go install
gomuks.go:25:2: cannot find package "maunium.net/go/gomuks/config" in any of:
        /usr/lib/go-1.10/src/maunium.net/go/gomuks/config (from $GOROOT)
        /home/ettinger/go/src/maunium.net/go/gomuks/config (from $GOPATH)
gomuks.go:26:2: cannot find package "maunium.net/go/gomuks/debug" in any of:
        /usr/lib/go-1.10/src/maunium.net/go/gomuks/debug (from $GOROOT)
        /home/ettinger/go/src/maunium.net/go/gomuks/debug (from $GOPATH)
gomuks.go:27:2: cannot find package "maunium.net/go/gomuks/interface" in any of:
        /usr/lib/go-1.10/src/maunium.net/go/gomuks/interface (from $GOROOT)
        /home/ettinger/go/src/maunium.net/go/gomuks/interface (from $GOPATH)
gomuks.go:28:2: cannot find package "maunium.net/go/gomuks/matrix" in any of:
        /usr/lib/go-1.10/src/maunium.net/go/gomuks/matrix (from $GOROOT)
        /home/ettinger/go/src/maunium.net/go/gomuks/matrix (from $GOPATH)
main.go:30:2: cannot find package "maunium.net/go/gomuks/ui" in any of:
        /usr/lib/go-1.10/src/maunium.net/go/gomuks/ui (from $GOROOT)
        /home/ettinger/go/src/maunium.net/go/gomuks/ui (from $GOPATH)

什么原因,如何解决?


解决方案


此存储库使用 Go 模块功能,并且安装说明明确指出它需要 Go 1.13 或更高版本:

从错误消息来看,您的 Go 1.10 似乎不支持模块(也可能不支持此存储库所依赖的其他功能)。

该错误是由于 Go 在 1.11 版本中添加了对先前模块的支持而导致的; go 工具始终在 $GOROOT$GOPATH 位置查找模块 - 在您的情况下,它无法在那里找到它们。

安装 Go 1.13 或更高版本以使安装指南正常工作。您可以在 backport PPA 中找到足够新的软件包,或者从可用的官方 tarball here 安装最新的软件包。

终于介绍完啦!小伙伴们,这篇关于《在Ubuntu上如何安装并编译gomuk》的介绍应该让你收获多多了吧!欢迎大家收藏或分享给更多需要学习的朋友吧~golang学习网公众号也会发布Golang相关知识,快来关注吧!

声明:本文转载于:stackoverflow 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
最新阅读
更多>
课程推荐
更多>