I’m trying to compile the latest Hydra v1.9.0-alpha.2 on an ARM64 platform running a Fedora 33 Linux. But the steps from the Install guide seem to be wrong:
[pine]{root}:/opt# go get -d -u github.com/ory/hydra
[pine]{root}:/opt# go install github.com/gobuffalo/packr/v1.9.0-alpha.2/packr2
cannot find package "github.com/gobuffalo/packr/v1.9.0-alpha.2/packr2" in any of:
/usr/lib/golang/src/github.com/gobuffalo/packr/v1.9.0-alpha.2/packr2 (from $GOROOT)
/opt/src/github.com/gobuffalo/packr/v1.9.0-alpha.2/packr2 (from $GOPATH)
I figured a copy/paste error, so I found /opt/src/github.com/gobuffalo/packr/v2/packr2 in my GOPATH directory, so I tried this:
[pine](1) {root}:/opt# go install github.com/gobuffalo/packr/v2/packr2
src/github.com/gobuffalo/packr/v2/packr2/cmd/fix/imports.go:16:2: cannot find package "golang.org/x/tools/go/ast/astutil" in any of:
/usr/lib/golang/src/golang.org/x/tools/go/ast/astutil (from $GOROOT)
/opt/src/golang.org/x/tools/go/ast/astutil (from $GOPATH)
I tried to satisfy this missing dependency by
go get github.com/gobuffalo/packr/v2/packr2
which succeeded and then continued with the installation guide steps:
[pine]{root}:/opt# cd $(go env GOPATH)/src/github.com/ory/hydra
[pine]{root}:/opt/src/github.com/ory/hydra# GO111MODULE=on make install-stable
HYDRA_LATEST=$(git describe --abbrev=0 --tags)
git checkout $HYDRA_LATEST
Your branch is up to date with 'origin/master'.
make pack
make[1]: Entering directory '/opt/src/github.com/ory/hydra'
GOBIN=/opt/src/github.com/ory/hydra/.bin/ go install github.com/gobuffalo/packr/v2/packr2
verifying github.com/oleiade/[email protected]/go.mod: checksum mismatch
downloaded: h1:rdFxbxq4QXVZWj0F+e9jqjDkc7dbp97vkRixKo2JR60=
go.sum: h1:RbATFBbKYkVdqmSFtx13Bb/tVhR0lgOBXunWTZKeL4w=
SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.
For more information, see 'go help module-auth'.
make[1]: *** [Makefile:24: .bin/packr2] Error 1
make[1]: Leaving directory '/opt/src/github.com/ory/hydra'
make: *** [Makefile:123: install-stable] Error 2
[pine](2){root}:/opt/src/github.com/ory/hydra#
Please help!