Search
Close this search box.

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 assists other systems in generating build files. CMake is unique compared to other build tools. Making and building makefiles is possible, but you can also tell CMake to create 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 the 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 updating 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 https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1.tar.gz

 

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:

 

./bootstrap

 

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! 

 

How to Install Visual Studio Code on Fedora

FAQ

CMake is an open-source build system that helps manage the build process of software projects across multiple platforms.

You can install CMake on CentOS using the following steps:

  1. Open a terminal and update your system packages by using the following command: sudo yum update
  2. Install the CMake package by running the following command: sudo yum install cmake
  3. Verify the installation by running the following command: CMake –version
  4. This should display the version of CMake installed on your system.

You can check if CMake is already installed on your CentOS system by running the following command: CMake –version
If CMake is installed, this command will display the version number of CMake installed on your system.

Yes, you can install CMake from the source on CentOS. However, using the package manager to install CMake is recommended, as it will manage dependencies and updates automatically.

The dependencies required to install CMake on CentOS are:

  • GCC (GNU Compiler Collection)
  • Make
  • ncurses-devel
  • zlib-devel
  • curl-devel

You can uninstall CMake from CentOS using the following command: sudo yum remove cmake

You can update CMake on CentOS by running the following command: sudo yum update cmake

Yes, CMake can be used to build C++ projects on CentOS and other programming languages like C, Java, and Python.

Yes, CMake is cross-platform and can be used on Windows, Linux, and macOS.

Make a Comment
Share on
Facebook
Twitter
LinkedIn
Print
VPSie Cloud service

Fast and Secure Cloud VPS Service

Try FREE
For a month

The First 1 orders gets free discount today! Try Sign up on VPSie to get a chance to get the discount.