libelektra
libelektra copied to clipboard
go get fails
$ go get github.com/ElektraInitiative/libelektra/src/bindings/[email protected]
go: downloading github.com/ElektraInitiative/libelektra v0.10.0
go: module github.com/ElektraInitiative/[email protected] found, but does not contain package github.com/ElektraInitiative/libelektra/src/bindings/go-elektra
@markus2330 is v0.10.0 tag pushed?
Yes, and it is found, see output above.
@markus2330 When using go get one needs to use the commit hash instead of using the tag, when using go modules which are nested, see following output (the go.mod then automatically uses v0.10.0):
$ go get -v github.com/ElektraInitiative/libelektra/src/bindings/go-elektra@4f45d0c
go: downloading github.com/ElektraInitiative/libelektra/src/bindings/go-elektra v0.10.0
go: added github.com/ElektraInitiative/libelektra/src/bindings/go-elektra v0.10.0
$ cat go.mod
module irgendwas
go 1.20
require github.com/ElektraInitiative/libelektra/src/bindings/go-elektra v0.10.0 // indirect
4f45d0c is the commit hash where also the tag
v0.10.0exists
At least the correct version tag is used in the go.mod file which is the most important thing.
I also tested the example in the go-elektra/README.md in an external go program, works also perfectly :grin:
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
$ go mod tidy
go: finding module for package github.com/ElektraInitiative/libelektra/src/bindings/go-elektra/kdb
go: found github.com/ElektraInitiative/libelektra/src/bindings/go-elektra/kdb in github.com/ElektraInitiative/libelektra/src/bindings/go-elektra v0.10.0
$ go run t.go
Value of "/go/elektra" is: Hello World!
$
@markus2330 Well, I don't know why, but now also go get github.com/ElektraInitiative/libelektra/src/bindings/[email protected] works. Probably it took some time :smile:
$ go clean -modcache
$ go get -v github.com/ElektraInitiative/libelektra/src/bindings/[email protected]
go: downloading github.com/ElektraInitiative/libelektra v0.10.0
go: downloading github.com/ElektraInitiative/libelektra/src/bindings/go-elektra v0.10.0
$
So, I think we can close this issue now!
@markus2330 Tried on windows as well, works also perfectly 🎉
PS> go get github.com/ElektraInitiative/libelektra/src/bindings/[email protected]
go: downloading github.com/ElektraInitiative/libelektra/src/bindings/go-elektra v0.10.0
go: downloading github.com/ElektraInitiative/libelektra v0.10.0
go: added github.com/ElektraInitiative/libelektra/src/bindings/go-elektra v0.10.0
Seems like go version 0.20.0 is needed. With the versions before it did not work for me.
I mark this stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping by writing a message here or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:
I closed this now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart: