如果要编译一些软件,但是系统源自带的cmake版本低了,那就要编译cmake了。
先卸载从系统源下载的cmake(如果有的话):
yum remove cmake -y
下载编译工具包:
yum install epel-release wget openssl-devel -y
yum groupinstall "Development tools" -y
下载cmake的源码并解压进入源码目录:
wget https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1.tar.gz
tar zxf cmake-3.20.1.tar.gz
cd cmake-3.20.1
运行自动配置编译选项:
./configure
编译并安装,大功告成:
make && make install