Go: verifying module: checksum mismatch — SECURITY ERROR This download does NOT match an earlier download recorded in go.sum
A module's content hash differs from the one recorded in go.sum (or the public checksum database).
verifying module: checksum mismatchSECURITY ERROR This download does NOT match an earlier download recorded in go.sumchecksum mismatch downloaded: h1: go.sum: h1:This download does NOT match an earlier downloadverifying go.mod: checksum mismatch Meaning
Do not ignore it. Common benign causes: a tag was force-moved/rewritten by the maintainer, a corrupted cache, or a stale local go.sum. Investigate before accepting: compare against the sumdb, clear the cache (go clean -modcache), then regenerate the entry only if you trust the new content.
Common causes
- Upstream retagged a version (force push)
- Corrupt module cache
- go.sum edited or merged incorrectly
- Proxy returning different content
- Genuine tampering (rare, but why the check exists)
⚡ Quick fix
- Run
go clean -modcacheand retry - Compare with
GOSUMDB(sum.golang.org) and the upstream tag - Remove the go.sum line and run
go mod tidyonly after verifying the source
Detailed fix by platform
Go
go clean -modcache && go mod downloadthengo mod verify
How to diagnose
- Module — Which version?
- Tag — Rewritten upstream?
- Cache — Cleared?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- avc: denied SELinux is preventing ... / avc: denied { read } for pid=... (permission denied despite correct permissions)
- cannot find package in any of GOROOT / GOPATH Go: cannot find package "github.com/pkg/errors" in any of: /usr/local/go/src/github.com/pkg/errors (from $GOROOT) /go/src/github.com/pkg/errors (from $GOPATH)
- go: updates to go.mod needed Go: go: updates to go.mod needed; to update it: go mod tidy
Most viewed in Go
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 4 Nov 2026