nidomiro

Software developer stories
en de

Install cmake 3.11.1 on Ubuntu

Sometimes you just want a newer version than ubuntu ships. This code will update cmake to version 3.11.1 or any other version you want.

# Removing the old cmake
sudo apt purge cmake
sudo apt autoremove

# Downloading the new
https://cmake.org/files/v3.11/cmake-3.11.1-Linux-x86_64.sh
sudo mkdir /opt/cmake
sudo sh cmake-3.11.1-Linux-x86_64.sh --prefix=/opt/cmake --skip-license
# Make it available
sudo update-alternatives --install /usr/bin/cmake cmake /opt/cmake/bin/cmake 1 --force