zema1/yarx

Windows 平台package embed is not in GOROOT

givemefivw opened this issue · 1 comments

师傅,在用源码编译的时候,win环境下执行go build -o yarx ./cmd/yarx命令会报错:server.go:6:2: package embed is not in GOROOT (D:\Go\src\embed),有的说执行go env -w GO111MODULE=off,但是还是无法编译,好像是路径的问题,想问下师傅这个问题如何解决呀

zema1 commented

应该启用 GO11MODULE ,可以通过 go env -w GO111MODULE=on 开启,如果你没做过 go 开发,可以直接下载 release 使用,这个由 github action 自动构建,完全可信,和自己从源码编译没区别。

https://github.com/zema1/yarx/releases