cd /usr/local/src
curl -o cmake.tar.gz -LO https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2-linux-x86_64.tar.gz
mkdir /usr/local/src/cmake
tar -xvf cmake.tar.gz
mv cmake-* /usr/local/cmake
echo 'export PATH="/usr/local/cmake/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
cmake --version
5/5 - (1 vote)