## 下载CMake安装包 [请从下载也选择合适的二进制包(Binary distributions)](https://cmake.org/download/) ## 安装 假设下载文件为:[cmake-3.22.0-linux-x86_64.tar.gz](https://github.com/Kitware/CMake/releases/download/v3.22.0/cmake-3.22.0-linux-x86_64.tar.gz) ```bash tar --strip-components=1 -xf cmake-3.22.0-linux-x86_64.tar.gz -C /usr/local cd /usr/local/bin ln -s cmake cmake3 ``` ## 验证 ```bash [root@localhost ~]# cmake --version cmake version 3.22.0 CMake suite maintained and supported by Kitware (kitware.com/cmake). ```