Skip to content

Upgrade CMake version on Ubuntu

Sriranga Kashyap edited this page Dec 13, 2024 · 4 revisions
  1. Remove existing cmake by executing sudo apt purge cmake

  2. Download the latest stable binaries from the CMake Github

  3. As of writing, is version 3.31.2

  4. Extract the archive tar -xf cmake-3.31.2-linux-x86_64.tar.gz

  5. Navigate into directory cd cmake-3.31.2-linux-x86_64

  6. Put the binaries into proper folders: sudo cp -r bin /usr/ && sudo cp -r share /usr/ && sudo cp -r doc /usr/share/ && sudo cp -r man /usr/share/

  7. Navigate out of directory cd ..

  8. Clean up rm -rf cmake-3.31.2-linux-x86_64 && rm cmake-3.31.2-linux-x86_64.tar.gz