# 缺少提供包 github.com/foo/bar 的模块的 go.sum 条目；要添加：go mod download github.com/foo/bar

- **ID:** `go/go-sum-missing-entry`
- **领域:** go
- **类别:** build_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

依赖已添加到 go.mod 但 go.sum 未更新，通常因为使用 -mod=mod 而未运行 tidy。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.16 | active | — | — |
| 1.23 | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   go mod tidy
   ```
2. **** (90% 成功率)
   ```
   go mod download github.com/foo/bar
   ```

## 无效尝试

- **** — This will regenerate all entries but may take time and cause network issues. (40% 失败率)
- **** — The hash must match exactly; a random hash will cause checksum mismatch. (100% 失败率)
