Prerequisites
Before proceeding with the installation of CMake on Debian 10, users must need to have:
A non-root user account on their computer systems along with the sudo rights.
Installation of the Latest Version of CMake
To install the latest version of CMake in your computer system follow these steps:
Step 1: Download CMake
Since the global repository of Debian does not provide any of the latest versions of CMake so, to proceed with the installation, we will be downloading it first. Open up the terminal window using the Ctl+Alt+T shortcut key in your Debian system. To download CMake in your system, you need to run the following wget command through the command line:
The process of CMake download is just like the one displayed in the figure below:
The process might take some time, so do not exit the terminal window any time soon.
Step 2: Extract CMake and run bootstrap
The next step is to extract the downloaded cmake-3.15.2.tar.gz file using the tar command. To do so, append the following command in the terminal window:
Followed by extracting the directory using the cd command, similar to the one displayed below:
Once you have reached the CMake directory, you need to run the bootstrap file to bootstrap CMake. Append the following command in the terminal window:
The output similar to the one displayed will appear on your computer screen.
After some time, CMake will be bootstrapped. Output like this one will confirm the completion.
Step 3: Installation of CMake
The next step is to run the make command. This step is done once CMake has been bootstrapped. Type the following in the terminal window and press the enter key:
When you press the enter key, the make command will begin to execute.
The make process will take time, so make sure that you do not exit the terminal window unless it reaches 100% completion.
After this, the last step is to install CMake using the following make command:
After some time, the process of installation will be completed.
This way users can follow the steps mentioned to easily install the latest version of CMake in their Debian 10 system.
Verification of installation
To verify the process of installation of CMake, type the following command in the terminal window:
As soon as you press the enter key, the installed CMake version will be displayed.
An output similar to the one displayed in the above image will confirm the CMake installation. If you do not receive such output, then you need to retry the steps mentioned above.
Conclusion
In this tutorial, we went through the method of installation of CMake on Debian 10. This is the latest version of CMake, and the steps mentioned above can easily be used to install it on Debian 10 system. We downloaded the latest version of CMake using the wget repository and then extracted the files. Then, we created the make file to continue the installation of CMake. Users can follow all these steps and then easily verify the process of its installation.