安装cmake 3,保留替换系统默认的
准备软件
wget https://cmake.org/files/v3.14/cmake-3.14.5-Linux-x86_64.tar.gz
tar zxvf cmake-3.14.5-Linux-x86_64.tar.gz -C /opt
ln -s cmake-3.14.5-Linux-x86_64 cmake
添加环境变量
vim /etc/profile
export CMAKE_HOME=/opt/cmake
export PATH=$CMAKE_HOME/bin:$PATH
source /etc/profile
验证
[root@mini test]# cmake --version cmake version 3.14.5 CMake suite maintained and supported by Kitware (kitware.com/cmake).