# go: github.com/foo/bar@v1.0.0: 打开 /root/go/pkg/mod/cache/download/github.com/foo/bar/@v/v1.0.0.zip: 没有那个文件或目录

- **ID:** `go/module-cache-corrupt`
- **领域:** go
- **类别:** data_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

模块缓存损坏或不完整，通常由于下载中断或手动删除。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.15 | active | — | — |
| 1.21 | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   go clean -modcache github.com/foo/bar
   ```
2. **** (95% 成功率)
   ```
   rm -rf $(go env GOMODCACHE) && go mod download
   ```

## 无效尝试

- **** — If the cache is corrupted, Go may still use the corrupted entry unless you clean it. (40% 失败率)
- **** — The hash may not match, causing checksum errors. (80% 失败率)
