{
  "id": "cmake/ninja-requires-cmake-3-20",
  "signature": "CMake Error: Could not create named generator 'Ninja' because the generator requires CMake >= 3.20 but you are running version 3.18.4",
  "signature_zh": "CMake错误：无法创建名为'Ninja'的生成器，因为该生成器需要CMake >= 3.20，但当前运行版本为3.18.4",
  "regex": "Could not create named generator 'Ninja' because the generator requires CMake >= \\d+\\.\\d+ but you are running version \\d+\\.\\d+\\.\\d+",
  "domain": "cmake",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The Ninja generator (or a specific Ninja version) requires a newer CMake, but an older CMake is installed.",
  "root_cause_type": "generic",
  "root_cause_zh": "Ninja生成器（或特定Ninja版本）需要更新的CMake，但安装了较旧的CMake。",
  "versions": [
    {
      "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"
    },
    {
      "version": "Ninja 1.11.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "CMake explicitly checks version requirements and refuses to use incompatible generators.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The version requirement is intrinsic to the generator's features, not Ninja itself; downgrading Ninja may break other builds.",
      "fail_rate": 0.65,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Upgrade CMake to version 3.20 or later. On Ubuntu: sudo apt install cmake=3.20.0-* or download from cmake.org.",
      "success_rate": 0.9,
      "how": "Upgrade CMake to version 3.20 or later. On Ubuntu: sudo apt install cmake=3.20.0-* or download from cmake.org.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use an alternative generator like 'Unix Makefiles' if Ninja is not strictly needed: cmake -G \"Unix Makefiles\" ..",
      "success_rate": 0.8,
      "how": "Use an alternative generator like 'Unix Makefiles' if Ninja is not strictly needed: cmake -G \"Unix Makefiles\" ..",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "升级CMake至3.20或更高版本。在Ubuntu上：sudo apt install cmake=3.20.0-* 或从cmake.org下载。",
    "如果不需要Ninja，使用替代生成器如'Unix Makefiles'：cmake -G \"Unix Makefiles\" .."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://cmake.org/cmake/help/latest/generator/Ninja.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2023-08-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}