centOs7 升级cmake3

  1. 卸载旧版本cmake2
yum remove cmake
  1. 下载安装cmake3
    wget https://github.com/Kitware/CMake/releases/download/v3.17.2/cmake-3.17.2.tar.gz
    
    tar -zxvf cmake-3.17.2.tar.gz
    
    cd cmake-3.17.2.tar.gz
    
    ./bootstrap --prefix=/usr/local/cmake
    
    gmake
    
    gmake install
    
    
  2. 添加系统环境变量
sudo vi /etc/profile

然后在profile文件的最后添加一行

export PATH=$PATH:/usr/local/cmake/bin

你可能感兴趣的:(软件工具)