Go modules: checksum mismatch
You can run go clean -modcache
and then go mod tidy
which will re-download all deps with the correct checksum (this updates the pkg cache in $GOPATH/pkg/mod/
).
To update vendor/
folder run: go mod vendor
.
- remove go.sum : rm go.sum
- regenerate go.sum : go mod tidy
Which version of Go are you using? There's a good chance you're running into the aftermath of the 1.11.2 -> 1.11.4
:
- https://github.com/golang/go/issues/27093
- https://github.com/golang/go/issues/27925
- https://github.com/golang/go/issues/29278
Which still isn't completely resolved. Remember that go mod
is still in development, so things like this will probably happen up and until 1.13.
Be sure to read up on minor releases for Go, and how these things can happen: https://github.com/golang/go/wiki/MinorReleases
TL;DR - Upgrade Go