Hydra: checksum mismatch compiling from source

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!

go get -d -u github.com/ory/hydra

THIS DOES NOT WORK WITH GO MODULES.

Just use go modules:

go get github.com/ory/[email protected]

Thanks for the reply. I tried that, but failed again:

[pine]{root}:/opt# go get github.com/ory/[email protected]
go: cannot use [email protected] syntax in GOPATH mode

After some googeling I came up with GO111MODULE=on so I tried this:

[pine]{root}:/opt# GO111MODULE=on go get github.com/ory/[email protected]
go: downloading github.com/ory/hydra v1.9.0-alpha.2
go get: github.com/ory/[email protected] requires
	github.com/ory/[email protected] requires
	github.com/gobuffalo/[email protected]: invalid version: unknown revision 046abeb7de46

I also tried an old release:

[pine](1) {root}:/opt# GO111MODULE=on go get github.com/ory/[email protected]
go: downloading github.com/ory/hydra v1.8.5
go get: github.com/ory/[email protected] requires
	github.com/ory/[email protected] requires
	github.com/gobuffalo/[email protected]: invalid version: unknown revision 046abeb7de46

What can I do?

What does go version say?

go version go1.15.5 linux/arm64

Yeah looks like one of the deps changed something. This will be hard to fix - please just download one of the prebuilt binaries: https://github.com/ory/hydra/releases