{
  "id": "cmake/cpack-generator-not-found",
  "signature": "CMake Error: CPack generator: DEB is not supported on this platform.",
  "signature_zh": "CMake 错误：CPack 生成器：此平台不支持 DEB。",
  "regex": "CPack generator: [A-Z]+ is not supported on this platform",
  "domain": "cmake",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "CPack generator specified (e.g., DEB) is not available on the current operating system (e.g., Windows or macOS without dpkg).",
  "root_cause_type": "generic",
  "root_cause_zh": "指定的 CPack 生成器（例如 DEB）在当前操作系统上不可用（例如 Windows 或没有 dpkg 的 macOS）。",
  "versions": [
    {
      "version": "CMake 3.16",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "CMake 3.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "CMake 3.28",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "dpkg requires a Debian-based system to function correctly; cross-platform DEB generation is not supported by CPack without extensive toolchain setup.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The error is about platform support, not configuration duplication; the generator must be available on the host system.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use a platform-conditional generator selection: if(WIN32) set(CPACK_GENERATOR \"NSIS\") else() set(CPACK_GENERATOR \"DEB\") endif(). This ensures only supported generators are used.",
      "success_rate": 0.95,
      "how": "Use a platform-conditional generator selection: if(WIN32) set(CPACK_GENERATOR \"NSIS\") else() set(CPACK_GENERATOR \"DEB\") endif(). This ensures only supported generators are used.",
      "condition": "",
      "sources": []
    },
    {
      "action": "For cross-platform builds, use a generic generator like TGZ or STGZ that works on all platforms: set(CPACK_GENERATOR \"TGZ\") in your CMakeLists.txt.",
      "success_rate": 0.9,
      "how": "For cross-platform builds, use a generic generator like TGZ or STGZ that works on all platforms: set(CPACK_GENERATOR \"TGZ\") in your CMakeLists.txt.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Run cpack -G TGZ to override the generator from the command line instead of modifying the CMakeLists.txt.",
      "success_rate": 0.85,
      "how": "Run cpack -G TGZ to override the generator from the command line instead of modifying the CMakeLists.txt.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用平台条件生成器选择：if(WIN32) set(CPACK_GENERATOR \"NSIS\") else() set(CPACK_GENERATOR \"DEB\") endif()。这确保只使用支持的生成器。",
    "对于跨平台构建，使用通用生成器如 TGZ 或 STGZ，它们在所有平台上工作：在 CMakeLists.txt 中设置 set(CPACK_GENERATOR \"TGZ\")。",
    "从命令行运行 cpack -G TGZ 覆盖生成器，而不是修改 CMakeLists.txt。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://cmake.org/cmake/help/latest/module/CPack.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}