download
https://github.com/Kitware/CMake/releases
[root@ALiYunOgenes ~]# wget /Kitware/CMake/releases/download/v3.22.0/cmake-3.22.
- 1
Decompression
[root@ALiYunOgenes ~]# tar zxf cmake-3.22.
- 1
- 2
Install
[root@ALiYunOgenes ~]# cd cmake-3.22.0/
[root@ALiYunOgenes cmake-3.22.0]# ./bootstrap --prefix=/usr --datadir=share/cmake --docdir=doc/cmake && make
[root@ALiYunOgenes cmake-3.22.0]# make install
[root@ALiYunOgenes cmake-3.22.0]# cmake --version
- 1
- 2
- 3
- 4
note
An error will be reported when there is insufficient memory: g++: internal compiler error: Killed (program cc1plus) ”, adding swap swap partition can be solved.
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See </bugzilla> for instructions.
gmake: *** [] Error 4
---------------------------------------------
Error when bootstrapping CMake:
Problem while running gmake
---------------------------------------------
Log of errors: /root/cmake-3.22.0//cmake_bootstrap.log
---------------------------------------------
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11