1.CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Performing Test HAVE_NO_NULL - Failed
-- Performing Test HAVE_NO_UNUSED_TYPEDEFS
CMake Error at /usr/share/cmake-2.8/Modules/CMakeCXXInformation.cmake:37 (get_filename_component):
get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Performing Test HAVE_NO_NULL - Failed
-- Performing Test HAVE_NO_UNUSED_TYPEDEFS
CMake Error at /usr/share/cmake-2.8/Modules/CMakeCXXInformation.cmake:37 (get_filename_component):
get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
CMakeLists.txt:3 (PROJECT)
报这个错是由于系统缺少gcc_c++,安装后解决。
2.
CMake Error at cmake/readline.cmake:83 (MESSAGE): Curses library not found. Please install appropriate package, remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
删除:CMakeCache.txt($:rm CMakeCache.txt);
如果系统是Ubuntu,安装libncurses5-dev($:apt-get install libncurses5-dev );
如果系统是CentOS,安装ncurses-devel(yum install ncurses-devel)
重新运行cmake命令。
编译成功后。
使用make && make install 命令。