Install CMake on Ubuntu when you need one build configuration to generate Make, Ninja, or IDE project files across local development and CI. Ubuntu’s default repositories are the quickest path, with CMake 4.2.x on Ubuntu 26.04 LTS, 3.28.x on 24.04 LTS, and 3.22.x on 22.04 LTS. For the current upstream stable release, currently CMake 4.3.2, use Snap or a source build on any supported LTS, or Kitware’s APT repository on Ubuntu 24.04 and 22.04.
Ubuntu does not install CMake on most systems by default, but the package is available through APT. You can choose the default repositories, Kitware’s repository, Snap, or a source build depending on how current and customizable the install needs to be.
Install CMake on Ubuntu
Ubuntu’s default APT package is the simplest and most stable option, but it can lag behind upstream releases. Kitware’s repository provides newer versions on its supported LTS releases, Snap offers an isolated package with classic confinement, and source builds give you full control over the version and build flags.
Default CMake versions differ across LTS releases:
| Ubuntu Release | Default CMake Series |
|---|---|
| Ubuntu 26.04 LTS | 4.2.x |
| Ubuntu 24.04 LTS | 3.28.x |
| Ubuntu 22.04 LTS | 3.22.x |
| Method | Source | Version Behavior | Updates | Best Fit |
|---|---|---|---|---|
| APT (Default) | Ubuntu Packages | Release-pinned series | Automatic via APT | Stable builds and CI baselines |
| Kitware APT | apt.kitware.com | Current upstream packages on 24.04 and 22.04 | Automatic via APT | Newer CMake without compiling on supported LTS releases |
| Snap | Snap Store | Latest stable track, plus older major tracks | Automatic snap refresh | Current CMake on all supported LTS releases |
| Source | GitHub Releases | Latest or chosen source tag | Manual rebuild | Custom build options and fixed source versions |
These steps cover Ubuntu 26.04 LTS, 24.04 LTS, and 22.04 LTS. Kitware’s repository currently publishes CMake packages for Ubuntu 24.04 and 22.04 in this article’s support scope; Ubuntu 26.04 users should use the default APT package, Snap, or the source build method unless Kitware adds a CMake package for 26.04 later.
If you are not sure where to start, use the default APT package. Choose Kitware’s repository when you need current upstream packages on Ubuntu 24.04 or 22.04, Snap when you want the latest stable release across all supported LTS versions, and source builds when you need a specific tag or custom build options.
Pick one method. Each install path ends with a version check so you can confirm CMake is on your PATH.
Method 1: Install CMake from Ubuntu’s Default APT Repository
This option is the simplest and integrates with normal system updates. Ubuntu ships CMake packages for all supported releases through the default repositories.
Refresh your package index:
sudo apt update
Package-management commands use
sudobecause they modify system directories. If your user is not in the sudoers file yet, follow the guide on how to add and manage sudo users on Ubuntu.
WARNING: apt does not have a stable CLI interface. Use with caution in scripts. Hit:1 http://security.ubuntu.com/ubuntu resolute-security InRelease Hit:2 http://archive.ubuntu.com/ubuntu resolute InRelease Hit:3 http://archive.ubuntu.com/ubuntu resolute-updates InRelease Hit:4 http://archive.ubuntu.com/ubuntu resolute-backports InRelease Reading package lists... Building dependency tree... Reading state information... 30 packages can be upgraded. Run 'apt list --upgradable' to see them.
Install the cmake package:
sudo apt install cmake
The older apt-get install form targets the same package name; this guide uses apt for interactive package-management examples.
Verify the installed version:
cmake --version
Ubuntu 26.04: cmake version 4.2.3 CMake suite maintained and supported by Kitware (kitware.com/cmake). Ubuntu 24.04: cmake version 3.28.3 CMake suite maintained and supported by Kitware (kitware.com/cmake). Ubuntu 22.04: cmake version 3.22.1 CMake suite maintained and supported by Kitware (kitware.com/cmake).
Update the default APT package when needed:
sudo apt install --only-upgrade cmake
Install Optional CMake Interfaces with APT
The main cmake package installs the command-line generator. Ubuntu also packages two optional interfaces: cmake-curses-gui provides the terminal-based ccmake command, and cmake-qt-gui provides the graphical cmake-gui launcher.
sudo apt install cmake-curses-gui cmake-qt-gui
These optional interface packages come from Ubuntu Universe. If APT cannot locate them on a minimal or customized system, enable Ubuntu Universe and Multiverse repositories, refresh APT, and rerun the install command.
Method 2: Install CMake from Kitware’s APT Repository
Kitware maintains an official APT repository that ships current upstream CMake packages for supported Ubuntu LTS releases without requiring a source build.
Use this method on Ubuntu 24.04 or 22.04. Kitware documents those releases for CMake packages in this article’s support scope; its current Ubuntu 26.04 repository metadata does not publish a CMake package, so 26.04 users should stay with default APT, Snap, or source builds.
Install the repository tools. Some minimal Ubuntu systems do not include curl by default, so keep this step even if your desktop already has it:
sudo apt install ca-certificates curl gpg
Download and store the signing key in the system keyring:
curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc | sudo gpg --dearmor --yes -o /usr/share/keyrings/kitware-archive-keyring.gpg
Add the Kitware repository using DEB822 format:
cat <<EOF | sudo tee /etc/apt/sources.list.d/kitware.sources
Types: deb
URIs: https://apt.kitware.com/ubuntu
Suites: $(lsb_release -cs)
Components: main
Architectures: $(dpkg --print-architecture)
Signed-By: /usr/share/keyrings/kitware-archive-keyring.gpg
EOF
Refresh your package index:
sudo apt update
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease Get:2 https://apt.kitware.com/ubuntu noble InRelease [15.5 kB] Hit:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease Hit:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease Hit:5 http://security.ubuntu.com/ubuntu noble-security InRelease Get:6 https://apt.kitware.com/ubuntu noble/main amd64 Packages [62.7 kB] Reading package lists... Building dependency tree... Reading state information... 5 packages can be upgraded. Run 'apt list --upgradable' to see them.
Install Kitware’s keyring package so future key updates are handled automatically:
sudo apt install kitware-archive-keyring
Confirm that APT will pull CMake from Kitware before installing:
apt-cache policy cmake | sed -n '1,10p'
cmake:
Installed: (none)
Candidate: 4.3.2-0kitware1ubuntu24.04.1
Version table:
4.3.2-0kitware1ubuntu24.04.1 500
500 https://apt.kitware.com/ubuntu noble/main amd64 Packages
Install CMake from Kitware:
sudo apt install cmake
Verify the installed version:
cmake --version
cmake version 4.3.2 CMake suite maintained and supported by Kitware (kitware.com/cmake).
Update the Kitware package through APT when needed:
sudo apt install --only-upgrade cmake
Method 3: Install CMake via Snap
Snap packages are self-contained and update automatically through Snap’s refresh mechanism. The CMake snap is maintained separately from the main CMake project by a CMake co-maintainer and published on the Snap Store.
Check whether snapd is available:
snap version
snap 2.74.1+ubuntu24.04.4 snapd 2.74.1+ubuntu24.04.4 series 16 ubuntu 24.04 kernel 6.17.0-22-generic architecture amd64
If the command is missing, install snapd first:
sudo apt install snapd
Your kernel line will differ from the example above.
Classic confinement gives the CMake snap full system access so it can read and write build directories without permission prompts. This is required for most development workflows.
Install the CMake snap with classic confinement:
sudo snap install cmake --classic
Verify the installed version:
cmake --version
cmake version 4.3.2 CMake suite maintained and supported by Kitware (kitware.com/cmake).
To refresh updates or view available channels, use:
sudo snap refresh cmake
snap info cmake
channels: latest/stable: 4.3.2 2026-04-21 (1531) 60MB classic latest/candidate: ^ latest/beta: ^ latest/edge: ^ 4.3/stable: 4.3.2 2026-04-21 (1531) 60MB classic 4.2/stable: 4.2.5 2026-04-22 (1539) 56MB classic 3.31/stable: 3.31.12 2026-04-22 (1534) 52MB classic
Snap channel versions, revisions, dates, and sizes change over time. The example reflects the amd64 channel output; if you use another architecture, run snap info cmake on that system before relying on a specific major line.
If you need a specific supported major line, install that Snap track explicitly after checking snap info cmake:
sudo snap install cmake --classic --channel=4.2/stable
Method 4: Compile CMake from Source
Source builds give you the latest upstream release and full control over build options, but you must rebuild manually when a new version ships. Review the CMake getting started guide for additional build requirements.
Install CMake Build Dependencies
Install the build tools, JSON parser, and OpenSSL headers required by the source workflow. The Install GCC on Ubuntu guide covers the compiler toolchain if you need more detail.
sudo apt install build-essential curl jq libssl-dev
Download the Latest CMake Source Archive
Create a dedicated source directory, then use the curl command and jq to detect the latest stable GitHub release and download the matching source archive:
mkdir -p ~/cmake-src
cd ~/cmake-src
CMAKE_TAG=$(curl -fsSL https://api.github.com/repos/Kitware/CMake/releases/latest | jq -r '.tag_name // empty')
if [ -z "$CMAKE_TAG" ]; then
echo "Could not detect the latest CMake release."
exit 1
fi
CMAKE_VERSION="${CMAKE_TAG#v}"
curl -fLO --progress-bar "https://github.com/Kitware/CMake/releases/download/$CMAKE_TAG/cmake-$CMAKE_VERSION.tar.gz"
printf 'Downloaded cmake-%s.tar.gz\n' "$CMAKE_VERSION"
Downloaded cmake-4.3.2.tar.gz
To build a fixed release instead of the latest stable release, replace the CMAKE_TAG=$(...) line with a tag from the CMake releases page, such as CMAKE_TAG=v4.2.5, before setting CMAKE_VERSION.
Extract and Enter the CMake Source Directory
Extract the archive with the same version variable from the download step, then switch into the source directory:
tar -xzf "cmake-$CMAKE_VERSION.tar.gz"
cd "cmake-$CMAKE_VERSION"
Bootstrap, Build, and Install CMake
Run the bootstrap script to configure the build:
./bootstrap
-- Performing Test run_pic_test - Success -- Performing Test run_inlines_hidden_test -- Performing Test run_inlines_hidden_test - Success -- Configuring done (13.9s) -- Generating done (0.7s) --------------------------------------------- CMake has bootstrapped. Now run gmake.
Compile CMake. The -j"$(nproc)" flag uses all available CPU cores to speed up the build:
make -j"$(nproc)"
[100%] Building CXX object Tests/CMakeLib/CMakeFiles/CMakeLibTests.dir/testDebuggerVariablesHelper.cxx.o [100%] Building CXX object Tests/CMakeLib/CMakeFiles/CMakeLibTests.dir/testDebuggerVariablesManager.cxx.o [100%] Building CXX object Tests/CMakeLib/CMakeFiles/CMakeLibTests.dir/testDebuggerThread.cxx.o [100%] Linking CXX executable CMakeLibTests [100%] Built target CMakeLibTests
Install the build to /usr/local:
sudo make install
-- Installing: /usr/local/share/cmake-4.3/Templates/AppleInfo.plist -- Installing: /usr/local/share/vim/vimfiles/indent -- Installing: /usr/local/share/vim/vimfiles/indent/cmake.vim -- Installing: /usr/local/share/vim/vimfiles/syntax -- Installing: /usr/local/share/vim/vimfiles/syntax/cmake.vim -- Installing: /usr/local/share/emacs/site-lisp/cmake-mode.el -- Installing: /usr/local/share/aclocal/cmake.m4 -- Installing: /usr/local/share/bash-completion/completions/cmake -- Installing: /usr/local/share/bash-completion/completions/cpack -- Installing: /usr/local/share/bash-completion/completions/ctest
Confirm the source build is the one in your PATH:
command -v cmake
cmake --version
/usr/local/bin/cmake cmake version 4.3.2 CMake suite maintained and supported by Kitware (kitware.com/cmake).
Create a CMake Update Script for Source Builds
Source builds do not update automatically, so create a small script that checks the latest tag and rebuilds only when needed. This script keeps your source build current without re-downloading when you are already up to date.
cat <<'EOF' > ~/cmake-src/update-cmake.sh
#!/usr/bin/env bash
set -euo pipefail
INSTALL_PREFIX="${INSTALL_PREFIX:-/usr/local}"
BUILD_DIR="${BUILD_DIR:-$HOME/cmake-src}"
RELEASE_API="https://api.github.com/repos/Kitware/CMake/releases/latest"
# Use sudo only when needed.
SUDO="sudo"
if [ "$(id -u)" -eq 0 ]; then
SUDO=""
fi
# Required tools for release detection.
for cmd in curl jq; do
if ! command -v "$cmd" >/dev/null 2>&1; then
echo "Error: $cmd is required but not installed."
echo "Run: $SUDO apt install curl jq"
exit 1
fi
done
# Detect the currently installed CMake version.
CURRENT_VERSION="$("$INSTALL_PREFIX/bin/cmake" --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -n 1 || true)"
if [ -z "$CURRENT_VERSION" ]; then
CURRENT_VERSION="$(cmake --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -n 1 || true)"
fi
if [ -z "$CURRENT_VERSION" ]; then
CURRENT_VERSION="none"
fi
# Fetch the latest stable release tag from GitHub.
LATEST_TAG=$(curl -fsSL "$RELEASE_API" | jq -r '.tag_name // empty')
if ! [[ "$LATEST_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Could not detect a stable CMake release tag from GitHub."
exit 1
fi
LATEST_VERSION="${LATEST_TAG#v}"
echo "Current version: $CURRENT_VERSION"
echo "Latest version: $LATEST_VERSION"
if [ "$CURRENT_VERSION" = "$LATEST_VERSION" ]; then
echo "CMake $CURRENT_VERSION is already up to date."
exit 0
fi
# Required tools and headers for downloads and builds.
for cmd in tar make gcc g++; do
if ! command -v "$cmd" >/dev/null 2>&1; then
echo "Error: $cmd is required but not installed."
echo "Run: $SUDO apt install build-essential"
exit 1
fi
done
if ! dpkg -s libssl-dev >/dev/null 2>&1; then
echo "Error: libssl-dev is required for the CMake bootstrap step."
echo "Run: $SUDO apt install libssl-dev"
exit 1
fi
echo "Updating CMake to $LATEST_VERSION..."
mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR"
# Prepare an exact source directory for this version.
ARCHIVE="cmake-$LATEST_VERSION.tar.gz"
SOURCE_DIR="$BUILD_DIR/cmake-$LATEST_VERSION"
rm -f -- "$ARCHIVE"
rm -rf -- "$SOURCE_DIR"
# Download, extract, build, and install.
echo "Downloading CMake $LATEST_VERSION..."
curl -fLO --progress-bar "https://github.com/Kitware/CMake/releases/download/$LATEST_TAG/$ARCHIVE"
echo "Extracting source archive..."
tar -xzf "$ARCHIVE"
rm -f -- "$ARCHIVE"
cd "$SOURCE_DIR"
echo "Configuring build..."
./bootstrap
echo "Compiling CMake..."
make -j"$(nproc)"
echo "Installing to $INSTALL_PREFIX..."
$SUDO make install
"$INSTALL_PREFIX/bin/cmake" --version | head -n 2
echo "Update complete."
EOF
Make the script executable:
chmod +x ~/cmake-src/update-cmake.sh
Run the script any time you want to check for updates:
~/cmake-src/update-cmake.sh
Current version: 4.3.2 Latest version: 4.3.2 CMake 4.3.2 is already up to date.
When an update is available, the script downloads the new source archive into ~/cmake-src, rebuilds it, and installs it to /usr/local unless you override INSTALL_PREFIX.
Run source-build updates manually rather than from cron. Compilation can fail if dependencies, compiler behavior, or network access change, and watching the output helps you stop before replacing a working build.
Test Your CMake Installation on Ubuntu
Verify that CMake can configure and build a simple project. If you do not already have a compiler, install the build tools first:
sudo apt install build-essential
Create a Test Project Directory
Create a directory for the test project:
mkdir -p ~/cmake-hello && cd ~/cmake-hello
Create the CMakeLists.txt File
Create the build configuration file:
nano CMakeLists.txt
Add the following configuration:
cmake_minimum_required(VERSION 3.16)
project(HelloWorld LANGUAGES CXX)
add_executable(hello main.cpp)
cmake_minimum_required: Ensures the CMake version meets the minimum required for the project.project: Names the project and enables the C++ language.add_executable: Defines the executable target and its source file.
Create the C++ Source File
Create the C++ source file:
nano main.cpp
Paste the following program:
#include <iostream>
int main()
{
std::cout << "Hello, World!" << std::endl;
return 0;
}
Configure the CMake Build
Generate build files in a separate build directory:
cmake -S . -B build
-- The CXX compiler identification is GNU 15.2.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done (0.1s) -- Generating done (0.0s)
Build the CMake Test Program
Compile the project:
cmake --build build
[ 50%] Building CXX object CMakeFiles/hello.dir/main.cpp.o [100%] Linking CXX executable hello [100%] Built target hello
Run the CMake Test Program
Run the compiled binary:
./build/hello
Hello, World!
Troubleshoot CMake on Ubuntu
CMake Bootstrap Fails with Missing OpenSSL Headers
If the bootstrap step cannot find OpenSSL, you will see errors like this:
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) CMake Error at Utilities/cmcurl/CMakeLists.txt:1001 (message): Could not find OpenSSL. Install an OpenSSL development package or configure CMake with -DCMAKE_USE_OPENSSL=OFF to build without OpenSSL. -- Configuring incomplete, errors occurred! --------------------------------------------- Error when bootstrapping CMake: Problem while running initial CMake ---------------------------------------------
Install the OpenSSL development package and run bootstrap again:
sudo apt install libssl-dev
./bootstrap
-- Configuring done (13.9s) -- Generating done (0.7s) --------------------------------------------- CMake has bootstrapped. Now run gmake.
CMake Cannot Find a C++ Compiler
If your system does not have a compiler installed, the configure step fails with output like:
-- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:2 (project): No CMAKE_CXX_COMPILER could be found. Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH. -- Configuring incomplete, errors occurred!
Install the compiler toolchain and rerun the configure step:
sudo apt install build-essential
cmake -S . -B build
Multiple CMake Versions in Your PATH
If you installed CMake from more than one method, check which binary is used first in your PATH. The shell built-in command -v shows the active binary without relying on a separate package:
command -v cmake
APT install: /usr/bin/cmake Source install: /usr/local/bin/cmake
To verify each version explicitly, run:
/usr/bin/cmake --version
/usr/local/bin/cmake --version
If you only want the source build, remove the APT or Snap package that is taking precedence, then open a new shell or run hash -r before checking the command path again.
CMake Command Not Found on Ubuntu
If you see cmake: command not found after installing from source, the /usr/local/bin directory may not be in your shell’s PATH. Verify the binary exists and check your current PATH:
ls -l /usr/local/bin/cmake
echo $PATH
If /usr/local/bin is missing from the output, add it to your shell configuration:
touch ~/.bashrc
grep -qxF 'export PATH="/usr/local/bin:$PATH"' ~/.bashrc || echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc
. ~/.bashrc
cmake --version
For APT or Snap installs, the binary is placed in standard locations (/usr/bin/cmake or /snap/bin/cmake) that are normally in PATH. If the command is still not found, confirm the method-specific package state:
dpkg-query -W -f='${db:Status-Abbrev} ${binary:Package}\n' cmake 2>/dev/null | grep '^ii' || echo "cmake APT package is not installed"
snap list cmake 2>/dev/null || echo "cmake snap is not installed"
If both checks report that CMake is not installed, return to the install method you want to use and rerun its install command.
CMake Version Too Old for a Project
Some projects require a minimum CMake version. If you see an error like:
CMake 3.28 or higher is required. You are running version 3.22.1
Your default APT version is too old for that project. On Ubuntu 22.04, projects targeting CMake 3.28+ need Kitware’s repository, Snap, or a source build. On Ubuntu 24.04, projects targeting CMake 3.30+ need an alternate method. Ubuntu 26.04 already ships CMake 4.2.x, so switch methods only when the project needs a newer 4.x release or a specific upstream tag.
Install a Specific CMake Version on Ubuntu
APT can install only package versions available from your configured repositories. Check the available package versions before pinning one:
apt-cache madison cmake
If the version you need appears, APT exact-version installs use package=version syntax, and the version string is specific to your Ubuntu release and enabled repositories. If the version does not appear, use a Snap major track such as 4.2/stable or build the matching source tag by replacing the automatic CMAKE_TAG detection line in the source method.
Remove CMake from Ubuntu
Use the removal steps that match the method you installed.
Remove the CMake APT Package (Default or Kitware)
Remove the package first:
sudo apt remove cmake
Preview unused dependencies before removing them:
sudo apt autoremove --dry-run
If the preview only lists packages you no longer need, run the real cleanup:
sudo apt autoremove
Verify the installed package state rather than relying on repository policy output:
dpkg-query -W -f='${db:Status-Abbrev} ${binary:Package}\n' cmake 2>/dev/null | grep '^ii' || echo "cmake package is not installed"
cmake package is not installed
If CMake was also installed through Snap or source, cmake can still exist on your PATH after the APT package is removed. Use the matching removal section for that method.
Remove the Kitware CMake Repository
Delete the repository file, remove Kitware’s keyring package if you installed it, and refresh APT:
sudo rm -f /etc/apt/sources.list.d/kitware.sources
sudo apt remove kitware-archive-keyring
sudo rm -f /usr/share/keyrings/kitware-archive-keyring.gpg
sudo apt update
Remove the CMake Snap Package
Uninstall the snap. The --purge option removes the package without saving snapd’s automatic recovery snapshot:
sudo snap remove --purge cmake
Verify the snap is gone:
snap list cmake 2>/dev/null || echo "cmake snap is not installed"
Remove a CMake Source Build
Use the install_manifest.txt created by make install in your source tree:
MANIFEST_PATH=$(find "$HOME/cmake-src" -maxdepth 2 -path "$HOME/cmake-src/cmake-*/install_manifest.txt" -print | sort -V | tail -n 1)
if [ -z "$MANIFEST_PATH" ]; then
echo "No install_manifest.txt found under ~/cmake-src."
exit 1
fi
cd "$(dirname "$MANIFEST_PATH")"
CMAKE_MAJOR_MINOR=$(basename "$PWD" | sed -E 's/^cmake-([0-9]+\.[0-9]+).*/\1/')
sudo xargs -a install_manifest.txt rm -f
sudo find "/usr/local/share/cmake-$CMAKE_MAJOR_MINOR" -depth -type d -empty -delete 2>/dev/null || true
Clear your shell’s command cache and check whether another CMake install remains:
hash -r
command -v cmake || echo "cmake is not on PATH"
Double-check the path before removing build directories. This cleanup deletes the CMake source tree from your home folder.
find "$HOME/cmake-src" -maxdepth 1 -type d -name 'cmake-[0-9]*' -exec rm -rf -- {} +
rm -f "$HOME/cmake-src"/cmake-*.tar.gz "$HOME/cmake-src/update-cmake.sh"
Useful CMake Resources
These upstream resources cover CMake usage, configuration, and troubleshooting beyond installation:
- CMake Getting Started Guide – Official introduction to CMake basics and first projects.
- CMake Documentation – Complete command and module reference with examples.
- CMake Support Page – Paid and community support options from Kitware, with links to the Discourse forum.
- CMake GitHub Repository – Source code, releases, and issue tracking.
Conclusion
With CMake installed on Ubuntu, you can generate build files for Make, Ninja, and popular IDEs from a single CMakeLists.txt configuration. The default APT package handles most development work, Kitware’s repository delivers current upstream packages on Ubuntu 24.04 and 22.04, Snap provides current and older major tracks across all supported LTS releases, and a source build gives full control over version and build flags. For production CI pipelines, pair CMake with GCC on Ubuntu to complete your toolchain.


Brilliant – APT path for Kitware repo worked like a charm!
Thank you
Thank you for taking the time to reply to my previous comment. I just wanted to clarify that the files in this link: https://github.com/Kitware/CMake/releases, do not include the boostrap script and other files you mentioned. The instructions do work but I had to download the file from this link: https://cmake.org/download.
I just thought that might be useful for others.
Hi again Roberto,
I am still at a loss how the GitHub download link did not show bootstrap and the other additional files, I downloaded Source code (tar.gz) yesterday and today and https://github.com/Kitware/CMake/archive/refs/tags/v3.28.2.tar.gz and it was in it and its exactly the same as the link on https://cmake.org/download.
Regardless, if it works now that’s great and the main thing, I should put this down as the main download location as its more simple for just grabbing the source to compile, the GitHub page is good if you need a pacific source as it contains much more than the source if you want CMake via another option, but it can be confusing.
Thanks for the feedback anyway.