When we are doing some applications, the compilation error is reported that the cmake version is too low. The default cmake version on Centos7 is version 2.8.11, which is a relatively low version, so we need to upgrade cmake
Official website transmission: https://cmake.org/
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)
The compilation process is as follows:
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 is relatively simple to compile. Generally, there will be no problems when the gcc environment and libstdc++.so.6 are okay.
View the compiled version:
ln -s /usr/local/bin/cmake /usr/bin/cmake
cmake --version
If you have installed yum locally, you need to uninstall it
yum remove cmake
ln -s /usr/local/bin/cmake /usr/bin/cmake
cmake --version
Now that the installation is complete, the installation of cmake is relatively simple, the following are the problems encountered during the installation process:
summary of a problem:
Recommended Posts