


I installed cmake 3.18.3 on CentOS 8.
Cmake
https://cmake.org/
In CentOS 8, 3.11.4 is standard.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
[root@centos8 ~]# dnf info cmake Last metadata expiration check: 1:01:39 ago on Thu Oct 1 10:51:06 2020. Installed Packages Name : cmake Version : 3.11.4 Release : 7.el8 Architecture : x86_64 Size : 24 M Source : cmake-3.11.4-7.el8.src.rpm Repository : @System From repo : AppStream Summary : Cross-platform make system URL : http://www.cmake.org License : BSD and MIT and zlib Description : 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: it is possible : to support complex environments requiring system configuration, preprocessor : generation, code generation, and template instantiation. [root@centos8 ~]# cmake --version cmake version 3.11.4 CMake suite maintained and supported by Kitware (kitware.com/cmake). |
environment
・CentOS Linux release 8.2.2004 (Core)
・Kernel 4.18.0-193.19.1.el8_2.x86_64
I chose the easiest way to install it 🙂
Download Latest Release
https://cmake.org/download/
- cmake-3.18.3-Linux-x86_64.sh download
- executable cmake-3.18.3-Linux-x86_64.sh
- make directory in which to install
- Run cmake-3.18.3-Linux-x86_64.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
[root@centos8 ~]# wget https://github.com/Kitware/CMake/releases/download/v3.18.3/cmake-3.18.3-Linux-x86_64.sh --2020-10-01 10:44:13-- https://github.com/Kitware/CMake/releases/download/v3.18.3/cmake-3.18.3-Linux-x86_64.sh Resolving github.com (github.com)... 52.192.72.89 Connecting to github.com (github.com)|52.192.72.89|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/537699/6499ac80-fcbe-11ea-81c9-a1819c4 65fac?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201001%2Fus-east-1%2Fs3%2Faws4_ request&X-Amz-Date=20201001T014414Z&X-Amz-Expires=300&X-Amz-Signature=656dda851d0a83ab242ae0304136db51330efa45eb fd603705c2f4bba876760e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=537699&response-content-disposition= attachment%3B%20filename%3Dcmake-3.18.3-Linux-x86_64.sh&response-content-type=application%2Foctet-stream [follow ing] --2020-10-01 10:44:14-- https://github-production-release-asset-2e65be.s3.amazonaws.com/537699/6499ac80-fcbe-11 ea-81c9-a1819c465fac?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201001%2Fus-east -1%2Fs3%2Faws4_request&X-Amz-Date=20201001T014414Z&X-Amz-Expires=300&X-Amz-Signature=656dda851d0a83ab242ae030413 6db51330efa45ebfd603705c2f4bba876760e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=537699&response-conte nt-disposition=attachment%3B%20filename%3Dcmake-3.18.3-Linux-x86_64.sh&response-content-type=application%2Foctet -stream Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.ama zonaws.com)... 52.217.101.244 Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3 .amazonaws.com)|52.217.101.244|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 41769762 (40M) [application/octet-stream] Saving to: 'cmake-3.18.3-Linux-x86_64.sh' cmake-3.18.3-Linux-x86_64.s 100%[===========================================>] 39.83M 5.89MB/s in 7.7s 2020-10-01 10:44:22 (5.15 MB/s) - 'cmake-3.18.3-Linux-x86_64.sh' saved [41769762/41769762] |
1 2 3 |
[root@centos8 ~]# file cmake-3.18.3-Linux-x86_64.sh cmake-3.18.3-Linux-x86_64.sh: POSIX shell script executable (binary data) [root@centos8 ~]# chmod u+x cmake-3.18.3-Linux-x86_64.sh |
This time, I’m going to set up /opt/cmake-3.18.3
1 |
[root@centos8 ~]# mkdir /opt/cmake-3.18.3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
[root@centos8 ~]# ./cmake-3.18.3-Linux-x86_64.sh --prefix=/opt/cmake-3.18.3 CMake Installer Version: 3.18.3, Copyright (c) Kitware This is a self-extracting archive. The archive will be extracted to: /opt/cmake-3.18.3 (snip) * Kitware, Inc. Do you accept the license? [yn]: y By default the CMake will be installed in: "/opt/cmake-3.18.3/cmake-3.18.3-Linux-x86_64" Do you want to include the subdirectory cmake-3.18.3-Linux-x86_64? Saying no will install in: "/opt/cmake-3.18.3" [Yn]: n Using target directory: /opt/cmake-3.18.3 Extracting, please wait... Unpacking finished successfully [root@centos8 ~]# ls -l /opt/cmake-3.18.3/ total 0 drwxr-xr-x. 2 root root 76 Sep 22 22:00 bin drwxr-xr-x. 3 root root 19 Sep 22 22:00 doc drwxr-xr-x. 4 root root 30 Sep 22 22:00 man drwxr-xr-x. 10 root root 131 Sep 22 22:00 share [root@centos8 ~]# /opt/cmake-3.18.3/bin/cmake --version cmake version 3.18.3 CMake suite maintained and supported by Kitware (kitware.com/cmake). |
I’m sorry for my poor English.