# CMake Error: FetchContent: Integrity check failed for <https://example.com/repo/archive/v1.0.tar.gz>
  Expected hash: abc123def456
  Actual hash:  789012ghi345

- **ID:** `cmake/fetchcontent-integrity-failure`
- **Domain:** cmake
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The downloaded archive's hash does not match the expected hash specified in FetchContent_Declare, indicating a corrupted download, a man-in-the-middle attack, or an outdated expected hash.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| cmake 3.14 | active | — | — |
| cmake 3.20 | active | — | — |
| cmake 3.28 | active | — | — |

## Workarounds

1. **Delete the cached download: rm -rf build/_deps/<name>-src and reconfigure to force re-download.** (85% success)
   ```
   Delete the cached download: rm -rf build/_deps/<name>-src and reconfigure to force re-download.
   ```
2. **Update the expected hash in FetchContent_Declare to the correct one from the official source, then clear cache.** (90% success)
   ```
   Update the expected hash in FetchContent_Declare to the correct one from the official source, then clear cache.
   ```

## Dead Ends

- **** — FetchContent caches the corrupted archive; need to delete the _deps directory first. (60% fail)
- **** — May accept a malicious or corrupted file; always verify the hash from a trusted source. (80% fail)
