Closed ngirardin closed 4 years ago
Sounds like a duplicate of #49
From your error message (thanks for sharing it) I see you're running quite old version of Go (1.10
). This project "requires" Go modules, which:
Go 1.11 and 1.12 include preliminary support for modules
Source: https://blog.golang.org/using-go-modules
Solution: update your Go version and try again?
Paging dr. @mholt: people (incl. me) have had difficulties getting the binary built.
I understand it's not a small task to get pre-built binaries automatically distributed, but in the meantime could we add to Installation
section in README:
Minimum Go version:
Sure. That's an easy solution.
Hi guys,
I've updated my Go version:
$ go version
go version go1.13.4 linux/amd64
But I can't still get the error when trying to download the package:
$ go get github.com/mholt/timeliner/cmd/timeliner
package github.com/pierrec/lz4/v3: cannot find package "github.com/pierrec/lz4/v3" in any of:
/usr/lib/go-1.13/src/github.com/pierrec/lz4/v3 (from $GOROOT)
/home/ngirardin/go/src/github.com/pierrec/lz4/v3 (from $GOPATH)
I don't have any experience with Go but I would be happy to help you setup a Github Action pipeline to create a binary / docker image.
Best, Nicolas
You're right, it doesn't seem to work still with the $ go get
command. The #49 I linked to fixed it for me because I did it by cloning + running the build command manually and even that didn't work befor that #49 fix. This seems to work (I tested just now):
$ git clone https://github.com/mholt/timeliner.git
$ cd timeliner/cmd/timeliner
$ go build
(I ran this inside a container by running $ docker run --rm -it golang:1.13.5-stretch bash
)
Now there's a working binary in ./timeliner
There might be something different w.r.t. how Go handles the dependency (modules') fetching with go get
vs. go build
- dunno.
Setting up GitHub action pipeline to auto-build binaries sounds like a great idea - WDYT @mholt?
Setting up GitHub action pipeline to auto-build binaries sounds like a great idea - WDYT @mholt?
Sure! ... how? 😅
You're right, it doesn't seem to work still with the
$ go get
command.
Ah... I forgot... so in Go 1.13, GO111MODULE is still "auto" by default, which in Go 1.13, means that you have to be in a folder (or subfolder) that has a go.mod file in order for modules to be enabled.
If you're installing the timeliner command, it's unlikely that that's the case. (But if you're in a Go project and you want to use timeliner as a library/dependency, then it probably is, but using timeliner as a library is not common...)
So simply do GO111MODULE=on go get ...
and it works. (I just tested it with a blank GOPATH.)
This won't be needed in Go 1.14 onwards, I'm pretty sure.
Merry Christmas!
go version go1.14.1 darwin/amd64 and I still got this error.
Also having this issue on 1.14.2.
I am not really sure what is going on. Please read the above reply for the solution that is working for me. This should probably be taken up upstream in the lz4 repo instead: https://github.com/pierrec/lz4/issues/62
Edit: Here's probably a more relevant issue in Go: https://github.com/golang/go/issues/40276
Hey guys,
I'm getting the following error that prevents me from installing timeliner:
Best,
Nicolas