# CMake Error: Version range constraint 3.20...3.25 is not satisfied by installed CMake version 3.18.4.

- **ID:** `cmake/version-range-constraint-unsatisfied`
- **Domain:** cmake
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

The project's CMakeLists.txt specifies a version range (e.g., cmake_minimum_required(VERSION 3.20...3.25)) which requires CMake >=3.20 and <4.0, but the installed CMake is older than the lower bound.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| cmake_minimum_required(VERSION 3.20...3.25) | active | — | — |
| CMake 3.18.4 | active | — | — |
| CMake 3.20.0 | active | — | — |

## Workarounds

1. **Download and install CMake 3.20 or newer from https://cmake.org/download/. For Linux: wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-linux-x86_64.tar.gz && tar -xzf cmake-3.20.0-linux-x86_64.tar.gz && sudo mv cmake-3.20.0-linux-x86_64 /opt/cmake-3.20 && sudo ln -sf /opt/cmake-3.20/bin/cmake /usr/local/bin/cmake** (90% success)
   ```
   Download and install CMake 3.20 or newer from https://cmake.org/download/. For Linux: wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-linux-x86_64.tar.gz && tar -xzf cmake-3.20.0-linux-x86_64.tar.gz && sudo mv cmake-3.20.0-linux-x86_64 /opt/cmake-3.20 && sudo ln -sf /opt/cmake-3.20/bin/cmake /usr/local/bin/cmake
   ```
2. **Use pip to install a newer CMake: pip install cmake==3.20.0 and ensure it's first in PATH.** (85% success)
   ```
   Use pip to install a newer CMake: pip install cmake==3.20.0 and ensure it's first in PATH.
   ```
3. **Modify CMakeLists.txt to use a single version lower bound: cmake_minimum_required(VERSION 3.18). Only do this if you verify the project doesn't use features from 3.20+.** (75% success)
   ```
   Modify CMakeLists.txt to use a single version lower bound: cmake_minimum_required(VERSION 3.18). Only do this if you verify the project doesn't use features from 3.20+.
   ```

## Dead Ends

- **Set CMAKE_MINIMUM_REQUIRED to a lower version like 3.18** — This bypasses the version check but may break build if project uses features from 3.20+. (70% fail)
- **Reinstall CMake from distro package manager (e.g., apt install cmake)** — Distro repositories often have outdated versions; apt may install 3.18 even if you ask for newer. (60% fail)
- **Use --version flag to check and then manually symlink to a newer version** — Symlinks don't resolve version constraints; cmake_minimum_required reads the actual binary version. (90% fail)
