Once you have both the cmake and the cmake3 package installed on your machine, you can use update-alternatives to switch between both packages.

Use the alternatives command to register both installations:

$ sudo alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake 10 \
--slave /usr/local/bin/ctest ctest /usr/bin/ctest \
--slave /usr/local/bin/cpack cpack /usr/bin/cpack \
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake \
--family cmake

$ sudo alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
--family cmake

After these two commands, cmake3 will be invoked by default, when you enter cmake from a bash prompt or start a bash script. The commands also take care of registering a few secondary commands like ctest which need to be switched along with cmake.

If you need to switch back to cmake 2.8 as the default, run the following command:

$ sudo alternatives --config cmake

There are 2 programs which provide 'cmake'.

  Selection    Command
-----------------------------------------------
   1           cmake (/usr/bin/cmake)
*+ 2           cmake (/usr/bin/cmake3)

Enter to keep the current selection[+], or type selection number: 1
Answer from sakra on Stack Overflow
🌐
Xinyustudio
xinyustudio.wordpress.com › 2014 › 06 › 18 › how-to-install-cmake-3-0-on-centos-6-centos-7
How to Install CMake 3.0 on CentOS 6 / CentOS 7 – Xinyustudio
June 18, 2014 - Follow the step below to install CMake 3.0 on CentOS 7: Download cmake-3.0.0.tar.gz to a folder, e.g. /home/user/Downloads Open a terminal and run below commands: tar -zxvf cmake-3.0.0.tar.gz This will unpack the gz file to a folder cmake-3.0.0 ...
Discussions

How to install ccmake or cmake-gui on CentOS7?
Specifically for cmake 3, not 2.8 More on reddit.com
🌐 r/CentOS
3
8
August 26, 2018
Newer version of cmake available in CentOS 7 than in CentOS 8? - Stack Overflow
Apart from building from source, is there any other way to obtain a newer version of cmake on CentOD 8? ... The cmake: 3.11.4 version will still be listed when you run yum info because it is already installed, so disabling the AppStream repo won't affect what is shown. More on stackoverflow.com
🌐 stackoverflow.com
Do you know how to install CMake 3.5 or higher in Cent OS ?
I found this: https://cmake.org/pipermail/cmake/2016-March/063085.html But I do not find any download link for CMake 3.5 or higher on https://cmake.org/download/. The last downloadable version of CMake that I see is 3.23.0-rc3. “lsb_release -d” outputs this: “1. Description: CentOS Linux ... More on discourse.cmake.org
🌐 discourse.cmake.org
0
0
March 18, 2022
Install dependencies cmake3
On your site in the dependencies there is cmake3 package, is this just a typo? Required packages … make: for /usr/bin/make cmake3: for /usr/bin/cmake3 … It is also in one-liner sudo yum install git cmake3 gcc-c++ gcc binutils \ libX11-devel libXpm-devel libXft-devel libXext-devel openssl-devel ... More on root-forum.cern.ch
🌐 root-forum.cern.ch
1
0
January 5, 2021
🌐
GitHub
gist.github.com › 1duo › 38af1abd68a2c7fe5087532ab968574e
Install CMake on CentOS 7. - Gist - GitHub
Worked as expected in RHEL 7. Although I didn't install the default version (with yum install cmake etc.) at all. ... I needed to run: source ~/.bashrc before it would work correctly. I was getting "CMake Error: Could not find CMAKE_ROOT !!!" errors.
🌐
CentOS Repositories
centos.pkgs.org › 7 › epel-aarch64 › cmake3-3.14.6-2.el7.aarch64.rpm.html
cmake3-3.14.6-2.el7.aarch64.rpm CentOS 7 Download
http://download-ib01.fedoraproject.org/pub/epel/7/aarch64/ Install epel-release rpm: # rpm -Uvh epel-release*rpm · Install cmake3 rpm package: # yum install cmake3 · 2019-09-01 - Antonio Trande <sagitter@fedoraproject.org> - 3.14.6-2 - Fix rename patches ·
🌐
Bits and Dragons
bitsanddragons.wordpress.com › 2022 › 09 › 19 › error-cmake-3-1-or-higher-is-required-you-are-running-version-on-centos-7-x
ERROR: CMake 3.1 or higher is required. You are running version … on CentOS 7.X | Bits and Dragons
September 26, 2022 - In the next lines, my CentOS 7.X version of it. ## > yum remove cmake ... Removed: cmake.x86_64 0:2.8.12.2-2.el7 Complete! ## > yum install build-essential libssl-dev No package build-essential available. No package libssl-dev available. Error: Nothing to do ## > wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3...
🌐
Blogger
jotmynotes.blogspot.com › 2016 › 10 › updating-cmake-from-2811-to-362-or.html
JotMyNotes: Updating CMake from 2.8.11 to 3.6.2 or Newer Version on CentOS Linux
October 4, 2016 - If you don't perform the above step to remove old CMake version, you may see below error after the final step that you installed the newer CMake version. CMake has most likely not been installed correctly · Download, extrace, compile and install the code cmake-3.6.2.tar.gz from https://cm...
🌐
Installati.one
installati.one › home › how to install cmake3 on centos 7
How To Install cmake3 on CentOS 7 | Installati.one
May 1, 2023 - In this tutorial we learn how to install cmake3 on CentOS 7 using yum and dnf.
Find elsewhere
🌐
Steemit
steemit.com › undefined › @dothebest0927 › centos7-how-to-cmake-3-8-2-build-required-minimum-version-1
[CentOS7] How to cmake 3.8.2 build (Required minimum version) - 1 — Steemit
May 27, 2019 - $ wget http://www.cmake.org/files/v3.8/cmake-3.8.2.tar.gz $ tar -zxvf cmake-3.6.1.tar.gz $ cd cmake-3.6.1 $ ./bootstrap (Required gcc Compiler) $ make $ make install $ \cp -f ./bin/cmake ./bin/cpack ./bin/ctest /bin $ cmake -version ... How to larger space(https://sjnov11.github.io/blog/cent_os/2018/11/02/extend_disk_size_on_centos7.html) ** Virutal marchine : ** Guest OS : ** Host OS : Windows 10 ... *How To Install GCC on CentOS 7 : (https://linuxhostsupport.com/blog/how-to-install-gcc-on-centos-7/)
🌐
SourceExample
sourceexample.com › article › en › 68a27e3315ce3e52c7074e044b7969ff
Centos install the latest version of cmake
July 27, 2020 - The default cmake version on Centos7 is version 2.8.11, which is a relatively low version, so we need to upgrade cmake ... It is recommended to compile the downloaded source code (download the binary file, although it can be executed, but you don’t know what dynamic link library will report an error, and it is difficult to solve a problem) ... wget -c https://github.com/Kitware/CMake/releases/download/v3.17.0-rc3/cmake-3.17.0-rc3.tar.gz tar zxvf cmake-3.17.0-rc3.tar.gz cd cmake-3.17.0-rc3./bootstrap gmake gmake install
🌐
CMake
cmake.org › install
Resources
February 22, 2023 - Since CMake is the most downloaded software build platform, there is an overwhelming number of resources out there. We wanted to pull together some of the best resources so you can easily find what you need no matter where you are in your CMake journey.
🌐
GitHub
gist.github.com › v0112358 › 1a85755046ae07fb2a660df60a037059
Install Cmake 3.11 CentOS 7.x · GitHub
Install Cmake 3.11 CentOS 7.x. GitHub Gist: instantly share code, notes, and snippets.
🌐
OrcaCore
orcacore.com › home › basic linux › install and use cmake on centos 7
Install and Use CMake on Centos 7 | Full Guide - OrcaCore
June 3, 2023 - To install the latest CMake version, you need to visit the CMake downloads page. Then, use the wget command to download the latest stable version of CMake: wget https://github.com/Kitware/CMake/releases/download/v3.22.3/cmake-3.2...
🌐
CMake Discourse
discourse.cmake.org › usage
Do you know how to install CMake 3.5 or higher in Cent OS ? - Usage - CMake Discourse
March 18, 2022 - I found this: https://cmake.org/pipermail/cmake/2016-March/063085.html But I do not find any download link for CMake 3.5 or higher on https://cmake.org/download/. The last downloadable version of CMake that I see is 3.23.0-rc3. “lsb_release -d” outputs this: “1. Description: CentOS Linux ...