-- 安全验证: [root@pudding cmake]# sha256sum -c cmake-3.26.4-SHA-256.txt # 其他版本未找到日志已忽略 cmake-3.26.4.tar.gz: OK sha256sum: WARNING: 16 listed files could not be read
解压,编译安装
1 2 3
tar zxvf cmake-3.26.4.tar.gz && cd cmake-3.26.4
./bootstrap && gmake && gmake install
缺少 c/c++ 编译环境:
1 2 3 4 5 6 7 8 9 10 11 12
[root@pudding cmake-3.26.4]# ./bootstrap && gmake && gmake install --------------------------------------------- CMake 3.26.4, Copyright 2000-2023 Kitware, Inc. and Contributors --------------------------------------------- Error when bootstrapping CMake: Cannot find appropriate C compiler on this system. Please specify one using environment variable CC. See cmake_bootstrap.logfor compilers attempted.
--------------------------------------------- Log of errors: /home/work/cmake-3.26.4/Bootstrap.cmk/cmake_bootstrap.log ---------------------------------------------
安装 gcc|g++
1 2 3 4
sudo yum -y install gcc gcc-c++ kernel-devel
gcc --version g++ --version
建立软链接
1 2 3 4 5 6 7 8 9
[root@pudding cmake-3.26.4]# /usr/local/bin/cmake --version cmake version 3.26.4
CMake suite maintained and supported by Kitware(kitware.com/cmake). [root@pudding cmake-3.26.4]# ln -s /usr/local/bin/cmake /usr/bin [root@pudding cmake-3.26.4]# cmake --version cmake version 3.26.4
CMake suite maintained and supported by Kitware(kitware.com/cmake).