# CMake Error: CPack generator: DEB is not supported on this platform.

- **ID:** `cmake/cpack-generator-not-found`
- **Domain:** cmake
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 88%

## Root Cause

CPack generator specified (e.g., DEB) is not available on the current operating system (e.g., Windows or macOS without dpkg).

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| CMake 3.16 | active | — | — |
| CMake 3.20 | active | — | — |
| CMake 3.28 | active | — | — |

## Workarounds

1. **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.** (95% success)
   ```
   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.
   ```
2. **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.** (90% success)
   ```
   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.
   ```
3. **Run cpack -G TGZ to override the generator from the command line instead of modifying the CMakeLists.txt.** (85% success)
   ```
   Run cpack -G TGZ to override the generator from the command line instead of modifying the CMakeLists.txt.
   ```

## Dead Ends

- **** — dpkg requires a Debian-based system to function correctly; cross-platform DEB generation is not supported by CPack without extensive toolchain setup. (90% fail)
- **** — The error is about platform support, not configuration duplication; the generator must be available on the host system. (100% fail)
