简体   繁体   English

如何在 Ubuntu 上编译 gomuks?

[英]How to compile gomuks on Ubuntu?

Trying to compile gomuks , following its insallation instructions , I get this error:尝试编译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)

What is the reason, how to solve it?是什么原因,如何解决?

This repo uses Go modules feature and installation instructions clearly state it requires Go 1.13 or higher:此 repo 使用 Go 模块功能和安装说明清楚地 state 它需要 Go 1.13 或更高版本:

  1. Install Go 1.13 or higher安装 Go 1.13 或更高版本

From error messages it seems you have Go 1.10 which doesn't support modules (and likely also other features this repo depends on).从错误消息看来,您似乎拥有不支持模块的 Go 1.10(并且可能还有此 repo 依赖的其他功能)。

This error is caused by fact that prior modules support was added to Go in version 1.11;此错误是由于 1.11 版本中的 Go 添加了先前的模块支持而导致的; go tool was always looking up modules in $GOROOT and $GOPATH locations - and in your case it can't find them there. go工具总是在$GOROOT$GOPATH位置查找模块 - 在您的情况下,它无法在那里找到它们。

Install Go 1.13 or higher to make the installation guide work.安装 Go 1.13 或更高版本以使安装指南工作。 You can find recent enough packages in backport PPA or install latest from official tarball available here .您可以在backport PPA中找到足够新的软件包,或者从此处提供的官方 tarball 安装最新的软件包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM