Categories
Solution

[solution] cmake 3.1 or higher is required. you are running version 2.8

If you are getting the error “cmake 3.1 or higher is required. you are running version 2.8” while trying to compile znc or something else on CentOS, follow the solution given here to upgrade your cmake from cmake 2 to cmake 3:
https://stackoverflow.com/a/59689105

If you get the error “Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.” while compiling cmake, you can try installing cmake 3.9.6 instead of the latest
https://github.com/Kitware/CMake/releases/download/v3.9.6/cmake-3.9.6.tar.gz

If cmake --version gives you error:
-bash: /usr/bin/cmake: No such file or directory
run hash -r and then check again.

Issues covered over this solution:
cmake 3.1 or higher is required. you are running version 2.8.12.2
Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.
-bash: /usr/bin/cmake: No such file or directory