Skip to content

Instantly share code, notes, and snippets.

@LegalizeAdulthood
Last active February 21, 2024 15:49
Show Gist options
  • Save LegalizeAdulthood/6fc0fcfc98b0c03bdb014d2cf43bc221 to your computer and use it in GitHub Desktop.
Save LegalizeAdulthood/6fc0fcfc98b0c03bdb014d2cf43bc221 to your computer and use it in GitHub Desktop.
Install latest CMake on ubuntu
# run this script with sudo
# From <https://askubuntu.com/questions/355565/how-do-i-install-the-latest-version-of-cmake-from-the-command-line>
apt remove --purge --auto-remove cmake
apt update
apt install -y software-properties-common lsb-release && \
apt clean all
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
apt update
apt install kitware-archive-keyring
rm /etc/apt/trusted.gpg.d/kitware.gpg
apt update
apt install cmake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment