Today we are going to learn that how to install CMake on CentOS 8. CMake is an open source & cross platform used to devleop, test & package the software. So, in this article you are going to cover the installation of CMake on CentOS 8.
Step 1: Update Your System
Firstly update yours system to have the latest packages installed.
sudo yum -y update
Step 2: Installing CMake on CentOS 8
As the CentOS Global repository doesn’t provides the latest version of the CMake so you’ve to manually download it and then instal it on your CentOS 8 system.
Fire the below command to download the latest version of CMake on CentOS 8.
wget https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3.tar.gz
Once the download finished, extract the downloaded package with the help of below command.
tar -zxvf cmake-3.17.3.tar.gz
Then switch to the resultant directory.
cd cmake-3.17.3
Now, run the following command to bootstrap cmake.
./bootstrap
Then run the make command.
make
And finally install the CMake using the below command.
sudo make install
Verify the installed version by typing
sudo --version
Step 3: Installing CMake from SnapCraft
You can also install the latest version of CMake with the help of SnapCraft. To do so hit the below listed commands.
sudo yum install epel-release
sudo yum install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
sudo snap install cmake --classic
So, this is how you can install CMake on CentOS 8. Do not forget to share this post and join our Telegram Channel.
sudo –version really ? 🙂
and and step3 should be renamed to method 2 🙂