Last active
December 6, 2021 11:33
-
-
Save pawansingh00/69d1947d53ce55dd183d461375472348 to your computer and use it in GitHub Desktop.
Installing latest cMake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Building and Installing (Recommended for developers) | |
# For this approach you need to install the GCC tools: | |
sudo apt update | |
sudo apt install build-essential libtool autoconf unzip wget | |
# 1 - Uninstall the default version provided by Ubuntu's package manager. | |
sudo apt remove --purge --auto-remove cmake | |
# or sudo apt purge --auto-remove cmake | |
# 2 - Go to the official CMake webpage, then download and extract the latest version. | |
# Update the version and build variables in the following command to get the desired version: | |
version=3.16 | |
build=3 | |
## don't modify from here | |
mkdir ~/temp | |
cd ~/temp | |
wget https://cmake.org/files/v$version/cmake-$version.$build.tar.gz | |
tar -xzvf cmake-$version.$build.tar.gz | |
cd cmake-$version.$build/ | |
# 3 - Install the extracted source by running: | |
./bootstrap | |
make -j$(nproc) | |
sudo make install | |
# 4 - Test your new cmake version. | |
cmake --version | |
# cmake version 3.16.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment