cmake config_error ai_generated true

CMake Error: No CMAKE_CXX_COMPILER could be found

ID: cmake/compiler-not-found

Also available as: JSON · Markdown
85%Fix Rate
88%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3 active

Root Cause

C/C++ compiler not installed or not in PATH.

generic

Workarounds

  1. 92% success Install build-essential (Debian) or gcc/g++ (RHEL)
    apt-get install build-essential
  2. 88% success Set CC/CXX environment variables if non-standard compiler location

Dead Ends

Common approaches that don't work:

  1. Set CMAKE_CXX_COMPILER to wrong path 85% fail

    Build fails with different error

  2. Install random compiler version 72% fail

    ABI incompatibility with dependencies