Can't install jose-util
dolmen opened this issue · comments
Olivier Mengué commented
The install instructions for jose-util are outdated as they are not using Go module mode:
$ go get -u github.com/go-jose/go-jose/jose-util
$ go install github.com/go-jose/go-jose/jose-util
All my attempts at installing in Go modules mode failed:
$ go install github.com/go-jose/go-jose/jose-util@latest
go: downloading github.com/go-jose/go-jose/jose-util v0.0.0-20230523200428-6531eff48398
go: downloading github.com/go-jose/go-jose v2.6.1+incompatible
go: github.com/go-jose/go-jose/jose-util@latest (in github.com/go-jose/go-jose/jose-util@v0.0.0-20230523200428-6531eff48398):
The go.mod file for the module providing named packages contains one or
more replace directives. It must not contain directives that would cause
it to be interpreted differently than if it were the main module.
$ go install github.com/go-jose/go-jose/jose-util@v3
go: github.com/go-jose/go-jose/jose-util@v3: no matching versions for query "v3"
The only thing that works is:
git clone https://github.com/go-jose/go-jose.git
cd go-jose/jose-util
go install .
However this is not the standard way of installing a binary in the Go modules era.
Matthew McPherrin commented
We are preparing to do a v4 release with an updated jose-util that can be installed with a standard go install command
Matthew McPherrin commented
Fixed in #98, will be tagged in /v4 shortly