Error with a golang dependency when using Go 1.10
Anirudh-MV opened this issue · 7 comments
Hello, I'm trying to build Acra from sources but I'm failing at the first step of the guide which is to install acra-keymaker.
This is the error I get when I run go get github.com/cossacklabs/acra/cmd/acra-keymaker
ubuntu@ip-10-1-1-1:~/work/src/go.opencensus.io$ go get github.com/cossacklabs/acra/cmd/acra-keymaker
package go.opencensus.io/exporter/jaeger: cannot find package "go.opencensus.io/exporter/jaeger" in any of:
/usr/lib/go-1.10/src/go.opencensus.io/exporter/jaeger (from $GOROOT)
/home/ubuntu/work/src/go.opencensus.io/exporter/jaeger (from $GOPATH)
This got resolved when I downgraded go.opencensus.io/ from latest to v0.19.x because the package jaeger is moved to contrib.go.opencensus.io
Hi @Anirudh-MV,
Based on /usr/lib/go-1.10/src
I suspect that you are using Go 1.10.
Some time ago development version of Acra started requiring at least Go 1.13 for compilation. This pulls in Go 1.11 module support and it should fix the issues with packages changing their source location.
While using older versions might work for some tools, it is recommended to use the latest stable version of Go (currently, that's Go 1.15).
Admittely, Go version requirements are not well-documented :(
Thank you @Anirudh-MV for pushing us to update Readme :)
As @ilammy mentioned, we support Acra for 2-3 latest Go versions only. We can't guarantee that it will work if you're using Go 1.10. Please use Go 1.11-1.13 or consider downloading Acra's as package or Docker container.
thank you for letting me know that I had to upgrade my golang
Please let us know if you have any further issues! Thank you for using Acra.
Hi, I am running into the same error as the original post with go version 1.15 and 1.13.15 linux/amd64
Hm 🤔 🤔 🤔
It seems that newer Go does not default to using modules for out-of-tree go get
s.
Could you please set
export GO111MODULE=on
in the shell before issuing go get
commands? That should help.
Alternatively, this variable can be set for individual commands, for example:
GO111MODULE=on go get github.com/cossacklabs/acra/cmd/acra-keymaker
This too needs to be noted in the docs, I guess...
Hi,
The export GO111MODULE=on
fix worked and I could install acra modules without any errors thrown.
Yes, I think this should be noted in the docs because I had the issue with different versions of go on different machines.