How to install the most current version

on Debian 10 ?

Since we only provide latest version of packages for Ubuntu (see, you have the following options:

  1. Download the pre-build binaries into ~/software directory, and create symlinks to ~/bin

    mkdir ~/software
    cd ~/software
    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}
  2. Create a python virtual env and pip install cmake

    Caveat: this approach do not provide cmake-gui and ccmake

    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}

    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