{
  "id": "cmake/version-range-constraint-unsatisfied",
  "signature": "CMake Error: Version range constraint 3.20...3.25 is not satisfied by installed CMake version 3.18.4.",
  "signature_zh": "CMake 错误：版本范围约束 3.20...3.25 未被已安装的 CMake 版本 3.18.4 满足。",
  "regex": "Version range constraint [0-9.]+[.][.][0-9.]+ is not satisfied by installed CMake version [0-9.]+",
  "domain": "cmake",
  "category": "config_error",
  "subcategory": null,
  "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.",
  "root_cause_type": "generic",
  "root_cause_zh": "项目的 CMakeLists.txt 指定了一个版本范围（例如 cmake_minimum_required(VERSION 3.20...3.25)），要求 CMake >=3.20 且 <4.0，但已安装的 CMake 版本低于下限。",
  "versions": [
    {
      "version": "cmake_minimum_required(VERSION 3.20...3.25)",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "CMake 3.18.4",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "CMake 3.20.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Set CMAKE_MINIMUM_REQUIRED to a lower version like 3.18",
      "why_fails": "This bypasses the version check but may break build if project uses features from 3.20+.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Reinstall CMake from distro package manager (e.g., apt install cmake)",
      "why_fails": "Distro repositories often have outdated versions; apt may install 3.18 even if you ask for newer.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Use --version flag to check and then manually symlink to a newer version",
      "why_fails": "Symlinks don't resolve version constraints; cmake_minimum_required reads the actual binary version.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "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",
      "success_rate": 0.9,
      "how": "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",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use pip to install a newer CMake: pip install cmake==3.20.0 and ensure it's first in PATH.",
      "success_rate": 0.85,
      "how": "Use pip to install a newer CMake: pip install cmake==3.20.0 and ensure it's first in PATH.",
      "condition": "",
      "sources": []
    },
    {
      "action": "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+.",
      "success_rate": 0.75,
      "how": "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+.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "从 https://cmake.org/download/ 下载并安装 CMake 3.20 或更高版本。对于 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",
    "使用 pip 安装更新的 CMake：pip install cmake==3.20.0 并确保其在 PATH 中优先。",
    "修改 CMakeLists.txt 使用单一版本下限：cmake_minimum_required(VERSION 3.18)。仅在确认项目不使用 3.20+ 特性时执行此操作。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-02-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}