I followed the first answer to this question.

 sudo apt-get install build-essential
 wget http://www.cmake.org/files/v3.2/cmake-3.5.0-rc2.tar.gz
 tar xf cmake-3.5.0-rc2.tar.gz
 cd cmake-3.5.0-rc2
 sudo apt-get install checkinstall
 sudo checkinstall

And this worked but ccmake was not installed. While googling I couldn't find how to add to the build/install cmake-curses-gui too.


I found an answer:


  1. Install libncurses5-dev
  2. Reconfigure/compile/install cmake
  3. Restart the shell (initially it was available, but the shell couldn't find it)

Solution (2018-12-07):

This doesn't work out of the box for me on Ubuntu 18.04 but the libncurses5-dev is a prerequisite library.

As said on SO there; I fixed it by running cmake-gui (the one previously installed without ccmake) in the sources directory of cmake itself (sounds strange but worked like a charm).

Then, I looked for BUILD_CursesDialog (as suggested in this thread [1]) in cmake-gui.
This option wasn't checked, so I checked it.
Click configure & generate.
Close cmake-gui.
Then run make -j4 & $ sudo checkinstall (I previously used $ sudo dpkg -r cmake to properly remove cmake).

[1] https://cmake.org/pipermail/cmake/2011-November/047657.html


$ which cmake

$ which cmake-gui

$ which ccmake

$ cmake --version
cmake version 3.13.20181205-gf92e9

$ cmake-gui --version
ccmake-gui version 3.13.20181205-gf92e9

$ ccmake --version
ccmake version 3.13.20181205-gf92e9

cmake's bootstrap script generates a Makefile that will also build ccmake if (as s.k. points out) the boolean variable BUILD_CursesDialog is set.

To decide the truth value of BUILD_CursesDialog, the bootstrap script tries compiling a simple ncurses program. If the compilation of the ncurses program fails, the BUILD_CursesDialog variable is unset. If libncurses5-dev is installed, the ncurses program builds and thus, the Makefile generated for cmake upon bootstrap also has instructions to build ccmake.

With this understanding of the current build process, the sequence of steps listed by augre are to be followed. Additionally, remember to also clean any temporary build files first (coming from a similar experience, I believe this is what s.k. did not do, and found an admirable :) hack to work around).

Thus, for me, running off git, the process is:

  • git clean -f -d

Replicate augre's solution:

  • install libncurses5-dev
  • Reconfigure/compile/install cmake
  • Potentially restart terminal

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.