cmake升级-ubuntu
1.卸载原来的cmake,安装依赖
sudo apt-get autoremove cmake
sudo apt install build-essential libssl-dev
2.下载新的cmake
https://cmake.org/files/ 选择版本:cmake-3.20.6-Linux-x86_64.tar.gz
3.解压cmake
sudo tar xf cmake-3.20.6-Linux-x86_64.tar.gz
4.编译,安装
cd进入解压出来的文件夹 sudo ./configure sudo make sudo make install
or
cd进入解压出来的文件夹
mv cmake-3.25.0-linux-x86_64 /opt/cmake-3.25.0
5.建立软连接
which cmake 得到路径“/usr/bin/cmake”
sudo ln -sf /opt/cmake3.25/cmake /usr/bin/cmake
6.执行 cmake --version,出现版本号即安装成功