on Debian 10 ?
Since we only provide latest version of packages for Ubuntu (see https://apt.kitware.com/), you have the following options:
-
Download the pre-build binaries into
~/software
directory, and create symlinks to~/bin
mkdir ~/software cd ~/software CMAKE_VERSION=3.17.3 CMAKE_ROOT=cmake-${CMAKE_VERSION}-Linux-x86_64 url=https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz curl -# -LO $url tar -xzvf ${CMAKE_ROOT}.tar.gz rm -f ${CMAKE_ROOT}.tar.gz for prog in cmake ccmake ctest cpack cmake-gui; do ln -s ~/software/${CMAKE_ROOT}/bin/${prog} ~/bin/${prog} done
-
Create a python virtual env and
pip install cmake
Caveat: this approach do not provide
cmake-gui
andccmake
env_dir=~/software/cmake-latest-venv python -m venv ${env_dir} ${env_dir}/bin/python -m pip install cmake for prog in cmake ctest cpack; do ln -s ${env_dir}/${prog} ~/bin/${prog} done
Then, each time you would like to update cmake, you could simply run
~/software/cmake-latest-venv/bin/python -m pip install --upgrade cmake
Alternatively, you could create one virtual env directory per version.
Yup. Iām on 3.17.3 now. thanks
1 Like