编译对应版本的cmake

sudo apt update
sudo apt-get install -y build-essential libssl-dev
wget https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2.tar.gz
tar -zxvf cmake-3.19.2.tar.gz
cd cmake-3.19.2/
./bootstrap
make

安装

sudo make install

sudo ln -sf /usr/local/bin/* /usr/bin/
sudo ln -sf /usr/local/bin/* /home/${USER}/bin/

查看版本

cmake -version