Fedora

How to Install CMake on Fedora Linux

CMake, or Cross-Platform Make, simplifies the often complex process of configuring, building, and managing the software projects on various platforms. Whether you are a developer or a Linux administrator, CMake can be a useful tool for you. CMake is an open-source tool that integrates with the Visual Studio Code. Moreover, you can easily develop, configure, and debug the C++ project. If you are a beginner, it may be hard for you to install CMake. In this tutorial, we will explain the multiple methods to install CMake on Fedora Linux.

How to Install CMake on Fedora Linux

This section has different parts in which we explain the various approaches that you can try to install CMake on your Fedora machine.

The Simple Approach

First, execute the following command to update your system according to the latest one available:

sudo dnf update

Once you are done with the update, you can install CMake using the following command:

sudo dnf install cmake -y

After installing CMake, you can now check its currently available version.

cmake --version

The Snap Package

Snapd is the service that manages the Snap packages. Install it if it’s not yet on your system.

sudo dnf install snapd

Now, enable the Snapd service to make it operational.

sudo systemctl enable --now snapd.socket

After that, install CMake by executing the following command:

sudo snap install cmake --classic

The “—classic” flag ensures that CMake can access the system resources and behave like a traditionally installed package.

How to Open CMake

All you need do is go to the “Application Menu” and search for CMake to open it.

Conclusion

CMake is a vital tool that simplifies the build and configuration processes, making it indispensable for developers, system administrators, etc. We explained the multiple ways to install and use CMake on Fedora Linux. These methods are super easy which you can use in your system, but make sure that you use the correct commands to eliminate the chances of errors.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.