How To Install cmake on Fedora 34

cmake is Cross-platform make system Cross-platform make system

Introduction

In this tutorial we learn how to install cmake on Fedora 34.

What is cmake

CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. CMake is quite sophisticated to support complex environments requiring system configuration, preprocessor generation, code generation, and template instantiation. cmake 3.20.5 1.fc34 x86_64 6.5 M cmake-3.20.5-1.fc34.src.rpm updates Cross-platform make system http BSD and MIT and zlib CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. CMake is quite sophisticated to support complex environments requiring system configuration, preprocessor generation, code generation, and template instantiation.

We can use yum or dnf to install cmake on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install cmake.

Install cmake on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install cmake using dnf by running the following command:

sudo dnf -y install cmake

Install cmake on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install cmake using yum by running the following command:

sudo yum -y install cmake

How To Uninstall cmake on Fedora 34

To uninstall only the cmake package we can use the following command:

sudo dnf remove cmake

cmake Package Contents on Fedora 34

/usr/bin/ccmake
/usr/bin/ccmake3
/usr/bin/cmake
/usr/bin/cmake3
/usr/bin/cpack
/usr/bin/cpack3
/usr/bin/ctest
/usr/bin/ctest3
/usr/lib/.build-id
/usr/lib/.build-id/09
/usr/lib/.build-id/09/29ea4e8c55761cd949c0a7b420c1b3d35b0c1c
/usr/lib/.build-id/2c
/usr/lib/.build-id/2c/c7cdd5fa6a062e92ee7cccfa2968147abe2ae9
/usr/lib/.build-id/ad
/usr/lib/.build-id/ad/e1bc4bca2d7c84071f817e25910563d1445089
/usr/lib/.build-id/b2
/usr/lib/.build-id/b2/cf0825cef01f348a237be4f98d760e9da9b7e6
/usr/share/doc/cmake
/usr/share/licenses/cmake
/usr/share/licenses/cmake/COPYING_cmcurl
/usr/share/licenses/cmake/COPYING_cmexpat
/usr/share/licenses/cmake/COPYING_cmlibarchive
/usr/share/licenses/cmake/COPYING_cmliblzma
/usr/share/licenses/cmake/COPYING_cmlibrhash
/usr/share/licenses/cmake/COPYING_cmnghttp2
/usr/share/licenses/cmake/Copyright.txt
/usr/share/licenses/cmake/Copyright.txt_KWIML
/usr/share/licenses/cmake/Copyright.txt_cmzlib
/usr/share/licenses/cmake/Copyright.txt_kwsys
/usr/share/man/man1/ccmake.1.gz
/usr/share/man/man1/cmake.1.gz
/usr/share/man/man1/cpack.1.gz
/usr/share/man/man1/ctest.1.gz
/usr/share/man/man7/cmake-buildsystem.7.gz
/usr/share/man/man7/cmake-commands.7.gz
/usr/share/man/man7/cmake-compile-features.7.gz
/usr/share/man/man7/cmake-developer.7.gz
/usr/share/man/man7/cmake-env-variables.7.gz
/usr/share/man/man7/cmake-file-api.7.gz
/usr/share/man/man7/cmake-generator-expressions.7.gz
/usr/share/man/man7/cmake-generators.7.gz
/usr/share/man/man7/cmake-language.7.gz
/usr/share/man/man7/cmake-modules.7.gz
/usr/share/man/man7/cmake-packages.7.gz
/usr/share/man/man7/cmake-policies.7.gz
/usr/share/man/man7/cmake-presets.7.gz
/usr/share/man/man7/cmake-properties.7.gz
/usr/share/man/man7/cmake-qt.7.gz
/usr/share/man/man7/cmake-server.7.gz
/usr/share/man/man7/cmake-toolchains.7.gz
/usr/share/man/man7/cmake-variables.7.gz
/usr/share/man/man7/cpack-generators.7.gz
/usr/bin/ccmake
/usr/bin/ccmake3
/usr/bin/cmake
/usr/bin/cmake3
/usr/bin/cpack
/usr/bin/cpack3
/usr/bin/ctest
/usr/bin/ctest3
/usr/lib/.build-id
/usr/lib/.build-id/31
/usr/lib/.build-id/31/4c5d6aa687a6567daa89f9a29b76a76864686e
/usr/lib/.build-id/43
/usr/lib/.build-id/43/b84c9ab5de00ae3aace323ff5e765036ce550d
/usr/lib/.build-id/9f
/usr/lib/.build-id/9f/c55173b5d15efd18b0053e5c5f94fc264070b4
/usr/lib/.build-id/bd
/usr/lib/.build-id/bd/080db43767928857f8a5f1192a0fc414afca3f
/usr/share/doc/cmake
/usr/share/licenses/cmake
/usr/share/licenses/cmake/COPYING_cmcurl
/usr/share/licenses/cmake/COPYING_cmexpat
/usr/share/licenses/cmake/COPYING_cmlibarchive
/usr/share/licenses/cmake/COPYING_cmliblzma
/usr/share/licenses/cmake/COPYING_cmlibrhash
/usr/share/licenses/cmake/COPYING_cmnghttp2
/usr/share/licenses/cmake/Copyright.txt
/usr/share/licenses/cmake/Copyright.txt_KWIML
/usr/share/licenses/cmake/Copyright.txt_cmzlib
/usr/share/licenses/cmake/Copyright.txt_kwsys
/usr/share/man/man1/ccmake.1.gz
/usr/share/man/man1/cmake.1.gz
/usr/share/man/man1/cpack.1.gz
/usr/share/man/man1/ctest.1.gz
/usr/share/man/man7/cmake-buildsystem.7.gz
/usr/share/man/man7/cmake-commands.7.gz
/usr/share/man/man7/cmake-compile-features.7.gz
/usr/share/man/man7/cmake-developer.7.gz
/usr/share/man/man7/cmake-env-variables.7.gz
/usr/share/man/man7/cmake-file-api.7.gz
/usr/share/man/man7/cmake-generator-expressions.7.gz
/usr/share/man/man7/cmake-generators.7.gz
/usr/share/man/man7/cmake-language.7.gz
/usr/share/man/man7/cmake-modules.7.gz
/usr/share/man/man7/cmake-packages.7.gz
/usr/share/man/man7/cmake-policies.7.gz
/usr/share/man/man7/cmake-presets.7.gz
/usr/share/man/man7/cmake-properties.7.gz
/usr/share/man/man7/cmake-qt.7.gz
/usr/share/man/man7/cmake-server.7.gz
/usr/share/man/man7/cmake-toolchains.7.gz
/usr/share/man/man7/cmake-variables.7.gz
/usr/share/man/man7/cpack-generators.7.gz
/usr/bin/ccmake
/usr/bin/ccmake3
/usr/bin/cmake
/usr/bin/cmake3
/usr/bin/cpack
/usr/bin/cpack3
/usr/bin/ctest
/usr/bin/ctest3
/usr/lib/.build-id
/usr/lib/.build-id/56
/usr/lib/.build-id/56/aeefc7ffa4895e1241dcf2efe30c472bd3b458
/usr/lib/.build-id/79
/usr/lib/.build-id/79/3f48f94fac371cdc6ef5e797d748485a175ce0
/usr/lib/.build-id/83
/usr/lib/.build-id/83/f5db02b791449e886b7a566c06444b54ca964a
/usr/lib/.build-id/9d
/usr/lib/.build-id/9d/758826984b62a79c722880f031211febed6893
/usr/share/doc/cmake
/usr/share/licenses/cmake
/usr/share/licenses/cmake/COPYING_cmcurl
/usr/share/licenses/cmake/COPYING_cmexpat
/usr/share/licenses/cmake/COPYING_cmlibarchive
/usr/share/licenses/cmake/COPYING_cmliblzma
/usr/share/licenses/cmake/COPYING_cmlibrhash
/usr/share/licenses/cmake/COPYING_cmnghttp2
/usr/share/licenses/cmake/Copyright.txt
/usr/share/licenses/cmake/Copyright.txt_KWIML
/usr/share/licenses/cmake/Copyright.txt_cmzlib
/usr/share/licenses/cmake/Copyright.txt_kwsys
/usr/share/man/man1/ccmake.1.gz
/usr/share/man/man1/cmake.1.gz
/usr/share/man/man1/cpack.1.gz
/usr/share/man/man1/ctest.1.gz
/usr/share/man/man7/cmake-buildsystem.7.gz
/usr/share/man/man7/cmake-commands.7.gz
/usr/share/man/man7/cmake-compile-features.7.gz
/usr/share/man/man7/cmake-developer.7.gz
/usr/share/man/man7/cmake-env-variables.7.gz
/usr/share/man/man7/cmake-file-api.7.gz
/usr/share/man/man7/cmake-generator-expressions.7.gz
/usr/share/man/man7/cmake-generators.7.gz
/usr/share/man/man7/cmake-language.7.gz
/usr/share/man/man7/cmake-modules.7.gz
/usr/share/man/man7/cmake-packages.7.gz
/usr/share/man/man7/cmake-policies.7.gz
/usr/share/man/man7/cmake-presets.7.gz
/usr/share/man/man7/cmake-properties.7.gz
/usr/share/man/man7/cmake-qt.7.gz
/usr/share/man/man7/cmake-server.7.gz
/usr/share/man/man7/cmake-toolchains.7.gz
/usr/share/man/man7/cmake-variables.7.gz
/usr/share/man/man7/cpack-generators.7.gz
/usr/bin/ccmake
/usr/bin/ccmake3
/usr/bin/cmake
/usr/bin/cmake3
/usr/bin/cpack
/usr/bin/cpack3
/usr/bin/ctest
/usr/bin/ctest3
/usr/lib/.build-id
/usr/lib/.build-id/73
/usr/lib/.build-id/73/7e8722cb9d0758b4b09167ca38753df38ae12d
/usr/lib/.build-id/90
/usr/lib/.build-id/90/4de1847f20321595e10cd256e4375d32daf315
/usr/lib/.build-id/c9
/usr/lib/.build-id/c9/bd28fd41ce9add106927afead8afd9744d29a0
/usr/lib/.build-id/ef
/usr/lib/.build-id/ef/c1265c95f8fb935fb19ba58e5d11d592d0c105
/usr/share/doc/cmake
/usr/share/licenses/cmake
/usr/share/licenses/cmake/COPYING_cmcurl
/usr/share/licenses/cmake/COPYING_cmexpat
/usr/share/licenses/cmake/COPYING_cmlibarchive
/usr/share/licenses/cmake/COPYING_cmliblzma
/usr/share/licenses/cmake/COPYING_cmlibrhash
/usr/share/licenses/cmake/COPYING_cmnghttp2
/usr/share/licenses/cmake/Copyright.txt
/usr/share/licenses/cmake/Copyright.txt_KWIML
/usr/share/licenses/cmake/Copyright.txt_cmzlib
/usr/share/licenses/cmake/Copyright.txt_kwsys
/usr/share/man/man1/ccmake.1.gz
/usr/share/man/man1/cmake.1.gz
/usr/share/man/man1/cpack.1.gz
/usr/share/man/man1/ctest.1.gz
/usr/share/man/man7/cmake-buildsystem.7.gz
/usr/share/man/man7/cmake-commands.7.gz
/usr/share/man/man7/cmake-compile-features.7.gz
/usr/share/man/man7/cmake-developer.7.gz
/usr/share/man/man7/cmake-env-variables.7.gz
/usr/share/man/man7/cmake-file-api.7.gz
/usr/share/man/man7/cmake-generator-expressions.7.gz
/usr/share/man/man7/cmake-generators.7.gz
/usr/share/man/man7/cmake-language.7.gz
/usr/share/man/man7/cmake-modules.7.gz
/usr/share/man/man7/cmake-packages.7.gz
/usr/share/man/man7/cmake-policies.7.gz
/usr/share/man/man7/cmake-presets.7.gz
/usr/share/man/man7/cmake-properties.7.gz
/usr/share/man/man7/cmake-qt.7.gz
/usr/share/man/man7/cmake-server.7.gz
/usr/share/man/man7/cmake-toolchains.7.gz
/usr/share/man/man7/cmake-variables.7.gz
/usr/share/man/man7/cpack-generators.7.gz

References

Summary

In this tutorial we learn how to install cmake on Fedora 34 using yum and dnf.