[SOLVED] CMake Error: your CXX compiler: “CMAKE_CXX_COMPILER-NOTFOUND” was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.

I am running Fedora KDE Spin. I was trying to compile a program. I tried running cmake but I got the following error:

CMake Error: your CXX compiler: “CMAKE_CXX_COMPILER-NOTFOUND” was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.

I already had gcc and cpp packages installed but I was still getting the above error.

I later figured that the package gcc-c++ was not installed. I installed it via yum and the error was gone:

yum install gcc-c++

Hope this helps.

If you enjoyed this post, make sure you subscribe to my RSS feed!
  • Chernov

    Thanks mate, helped me out of a toughie.

  • Thanks, helped me while installing OpenCV on a linux box (http://opencv.willowgarage.com/wiki/InstallGuide_Linux). Gave a +1.

  • Thank you very much for that info 🙂 It ‘s hard to find troubleshooting guides on spins (or fedora for the same matter)

  • Karthik

    Thanks, it helped me while installing opencv.

  • Zulqarnain_mian

    i have same error on windows 7 ??? what i can do???

  • Aidan Zhakypov

    Thanks!)

  • Ben Watson

    Brilliant – thank you!

  • Kevin O’Kelley

    Thank you!!! I see gcc and assumed that C++ was included.

  • gecan

    Thanks, it helped me while installing GMT5.1

  • hiims

    thanks!!!

  • rod

    Many thanks!