cd /usr/local/src/
wget https://cmake.org/files/v3.23/cmake-3.23.0.tar.gz
cp cmake-3.23.0.tar.gz /usr/local/src/
cd /usr/local/src/
tar -zxvf cmake-3.23.0.tar.gz
cd cmake-3.23.0
./bootstrap
gmake
gmake install
/usr/local/bin/cmake --version
ln -s /usr/local/bin/cmake /usr/bin/cmake
cmake --version
#查看当前是否安装
#centos
rpm -qa |grep cmake
#debian
apt list --installed|grep cmake