CMake CentOS更新版本

下载    wget https://github.com/Kitware/CMake/releases/download/v3.16.1/cmake-3.16.1.tar.gz

 卸载已有版本 rpm -e cmake

编译安装

            ./configure && make && make install


注意1)旧版本没有卸载

cmake
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/bin
Segmentation fault (core dumped)


注意2)bash: /usr/bin/cmake: No such file or directory

刚刚安装完,在当前shell执行指令,还是会指向/usr/bin,这个时候,可以指定执行的目录/usr/local/bin/cmake,或者创建控制台shell