How to Install CMake on Fedora 36 Linux


CMake is a well-known compiler that has gained much popularity in recent years. The main reason for its popularity is that it is open-source and cross-platform, so developers can use it on any operating system they want and don’t have to worry about licensing fees. Additionally, CMake can generate wrappers and executables in any combination, making it very versatile.

While some compilers are designed to only work with specific languages or operating systems, CMake can be used with any programming language and on any platform. This makes it an ideal choice for developers who want the flexibility to work on various projects. CMake is also constantly being updated with new features and improvements, so developers can be confident that they are using an always up-to-date tool. With its many benefits, it’s no wonder that CMake has become so popular in recent years.

In the following tutorial, you will learn how to install CMake on Fedora 36 Linux workstation or server using the command line terminal with two methods: dnf package manager with the native app-stream or compile method.

Update Fedora

First, update your system to ensure all existing packages are up to date.

sudo dnf upgrade --refresh

Install CMake – DNF Method

The first method recommended for most users will install CMake from the appstream. This version is recommended unless you request a specific version or the latest, which you will need to use the compile method.


To begin the installation, use the following command.

sudo dnf install cmake

Once installed, confirm the installation by checking the version of CMake.

cmake --version

Example output:

cmake version 3.22.2

Install CMake – Compile Source Method

The second option for users requiring the latest version of CMake is downloading the source and compiling it. This is an excellent method as it allows you to install the newest version, but it comes at the cost of remembering to download and re-compile for updates.

Before proceeding further, install the following required dependencies on your system using the following command.

sudo dnf install gcc gcc-c++ openssl-devel bzip2-devel libffi-devel zlib-devel wget make -y

First, visit the Github releases page and grab the latest version link.


Do not forget to do this, as the examples link below will be outdated in time.

Next, download the archive using the wget command.

Example only:


Extract the archive contents using the following command.

tar -zxvf cmake-{version number}.tar.gz

Optionally, move the CMake directory under /opt/ location.

sudo mv cmake* /opt/

Now, navigate to the directory.


cd /opt/cmake-{your version}

In the next part, you will execute the Bootstrap script. If you encounter any issues, ensure that the dependencies mentioned are installed.

sudo ./bootstrap

Example output once complete:

How to Install CMake on Fedora 36 Linux

The Bootstrap script may take a few minutes. Once done, use the make command to build the package.

sudo make

This process can take a few minutes to almost ten minutes to make a coffee or grab a drink.

Example when complete:

How to Install CMake on Fedora 36 Linux

Next, install CMake using the following make install command.


sudo make install

Example output:

How to Install CMake on Fedora 36 Linux

Once the installation has finished, check the CMake version.

Once done, confirm the version using the following command

cmake --version

Example output:

cmake version 3.24.1

Comments and Conclusion

In short, CMake is a powerful and versatile compiler that has gained immense popularity in the past few years. Its open-source and cross-platform nature make it an attractive option for developers of all levels. In contrast, its ability to generate wrappers and executables makes it an excellent choice for any project.

For further reading, visit CMake’s official documentation.


Share on: