1.查看当前版本,并卸载
#cmake --version
sudo yum remove cmake cmake-data

2.获取新版本源码
wget https://cmake.org/files/v3.9/cmake-3.9.2.tar.gz

3.编译该源码,并创建软连接
tar -zxvf cmake-3.9.2.tar.gz
./configure
make && make install
ln -s /usr/cmake-2.8.9-Linux-i386/bin/* /usr/bin/
4.查看新版本
cmake --version

网友评论