go
data_error
ai_generated
true
go: github.com/foo/[email protected]: open /root/go/pkg/mod/cache/download/github.com/foo/bar/@v/v1.0.0.zip: no such file or directory
ID: go/module-cache-corrupt
80%Fix Rate
84%Confidence
0Evidence
2024-09-12First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 1.15 | active | — | — | — |
| 1.21 | active | — | — | — |
Root Cause
The module cache is corrupted or incomplete, often due to interrupted downloads or manual deletion.
generic中文
模块缓存损坏或不完整,通常由于下载中断或手动删除。
Workarounds
-
90% success
go clean -modcache github.com/foo/bar
-
95% success
rm -rf $(go env GOMODCACHE) && go mod download
Dead Ends
Common approaches that don't work:
-
40% fail
If the cache is corrupted, Go may still use the corrupted entry unless you clean it.
-
80% fail
The hash may not match, causing checksum errors.