How To Install cmake on CentOS 8
Introduction
In this tutorial we learn how to install cmake
on CentOS 8.
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.
We can use yum
or dnf
to install cmake
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install cmake.
Install cmake on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 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 CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 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 CentOS 8
To uninstall only the cmake
package we can use the following command:
sudo dnf remove cmake
cmake Package Contents on CentOS 8
/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/26
/usr/lib/.build-id/26/205a22ab239a52d3160f82dd57bb1e057ba113
/usr/lib/.build-id/37
/usr/lib/.build-id/37/cc4b587815aa0ee747407fc371e025bbee677b
/usr/lib/.build-id/55
/usr/lib/.build-id/55/30795972e175f8e2ab7bb3e7d1df3fdc436ad1
/usr/lib/.build-id/6d
/usr/lib/.build-id/6d/8fbd5973f05d383c7f9648e91933f8fd4cd0a0
/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-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/cmake
/usr/bin/cpack
/usr/bin/ctest
/usr/lib/.build-id
/usr/lib/.build-id/16
/usr/lib/.build-id/16/3e08c69d6d6e6b707447a88b750d9c50c295d3
/usr/lib/.build-id/21
/usr/lib/.build-id/21/41f3cac7a87932e47299008a17ca6390082996
/usr/lib/.build-id/64
/usr/lib/.build-id/64/166b796271687247a464960f0a995777ca1d96
/usr/lib/.build-id/c2
/usr/lib/.build-id/c2/76bc5674361b719d1b19bcb743101314d57454
/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-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 CentOS 8 using yum and dnf.