How To Install CMake on CentOS 8

Table of Contents

How To Install CMake on CentOS 8





CMake is an open-source cross-platform project that can automate, test, package, and install software independent of the compiler. CMake isn’t a build system, but rather it assists other systems in generating build files. CMake is unique compared to other build tools. Making makefiles and building them is possible, but you can also tell CMake to make a visual studio solution instead. For external programs, you have the same option. They are the choice of the maintainer of the library you use and there are no standards for things like code generation. In this article, we’ll show you how to install CMake on CentOS 8





Step 1: Configure VPSie cloud server


Those who already have a system up and running should skip this step and do update their system.

  1. Sign in to your system or register a newly created one by logging in to your VPSie account. 
  2. Connect by SSH using the credentials we emailed you.
  3. Once you have logged into your CentOS 8 instance and update your system.




Check if the box needs any updates,



# sudo yum updateinfo



Run the command if it is available,



# sudo dnf update








Step 2: Install the latest version of CMake







Here’s how we install the latest version of CMake:






To obtain the source code, type the following command:



# wget





Run the following command to extract it:



# tar -zxvf cmake-3.22.1.tar.gz




After that, move to the extracted folder as follows:



# cd cmake-3.22.1





Install CMake with the following commands:





Once bootstrapped, run the following command:



# make




Installation is as follows:



# sudo make install




Type the following command to check the CMake version after installation:



# cmake --version







Hopefully, Your system is now running Cmake, you can use it now. Thanks for reading! I hope it was informative for you! 







Share on