Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go install: [...]: module [...]@latest found, but does not contain package ...v4/cmd/lz4c #174

Open
cedricvanrompay opened this issue Mar 6, 2022 · 4 comments

Comments

@cedricvanrompay
Copy link

Trying to follow the installation instructions from the README:

$ go install github.com/pierrec/lz4/v4/cmd/lz4c
go install: version is required when current directory is not in a module
	Try 'go install github.com/pierrec/lz4/v4/cmd/lz4c@latest' to install the latest version
$ go install github.com/pierrec/lz4/v4/cmd/lz4c@latest
go: downloading github.com/pierrec/lz4/v4 v4.1.14
go: downloading github.com/pierrec/lz4 v2.6.1+incompatible
go install: github.com/pierrec/lz4/v4/cmd/lz4c@latest: module github.com/pierrec/lz4/v4@latest found (v4.1.14), but does not contain package github.com/pierrec/lz4/v4/cmd/lz4c

I tried several things read on the Web like go clean -modcache but this does not help

@pierrec
Copy link
Owner

pierrec commented Mar 22, 2022

Thanks for reporting this. It looks like it is broken. WIll investigate.

@wkhere
Copy link

wkhere commented Nov 6, 2022

Hello, @pierrec. I was also hit by this error. Just a hint here, I believe there is no need to have another module in ./cmd/lz4c. I think the common practice is to just have single per-project module, and still the commands under ./cmd/... are installable this wat via go install github.com/user/project/vN/cmd/xxxx@latest

@wkhere
Copy link

wkhere commented Mar 9, 2023

Hey @pierrec . Again confirming as above: no need to have go.mod and go.sum in the cmd/lz4c directory. It's enough to delete them to get this issue fixed.

As a proof, please install my fork:

go install github.com/wkhere/lz4/cmd/lz4c@latest

which is your project with just go.mod/sum deleted from cmd/lz4c and the module name changed to reflect my github path in the toplevel go.mod.

@corneliusroemer
Copy link
Contributor

I can confirm @wkhere's install command works in contrast to the one in the readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants