CMake Error at CMakeLists.txt:2

dear all
i am newbie using cmake.
i found a problem since i have to upgrade my cmake.
actually i already install cmake new version 3.15.6
i am too struggle how to fixed this.

CMake Error at CMakeLists.txt:2 (cmake_minimum_required):
CMake 3.12 or higher is required. You are running version 3.10.2

what i should do with

cmake [options]
cmake [options]
cmake [options] -S -B

anyone could help me?
thank you for help

If you run:

$ cmake --version

I think you will find that it will report version 3.10.2.

Where did you install the new CMake? I’m guessing you don’t have it in your $PATH.

thank you.
if i run cmake --version
cmake version 3.15.6
CMake suite maintained and supported by Kitware (

this is path in my cmake

i want to changes directly from CMakeList.txt but always back to default
whereis cmake
cmake: /usr/bin/cmake /usr/local/bin/cmake /usr/share/cmake /usr/share/man/man1/cmake.1.gz

This is starting to look like an only partly-installed CMake. When you install the cmake binary, you need to install all of the module files too.

What do you get for:

$ which cmake

? And did you install 3.15.6 into /usr/local/bin?

$which cmake

i am not sure the new version was there (usr/local/bin)
since i have 2 version here.

What OS are you using? I would suggest uninstalling the OS version of CMake to ensure you only have one version. For example, if you’re using Ubuntu, run:

$ sudo apt-get remove cmake

Linux 18. I already uninstall and reinstall with new version.but this problem looks like from gui i am not sure about that.
I want to run “cmake .” But crash the version