CentOS7升级cmake v3.10.2 (当前最新版为 v3.19.2)

在cmake编译阶段失败,错误如下:

 [WARNING] CMake Error at CMakeLists.txt:23 (cmake_minimum_required):
 [WARNING] CMake 3.1 or higher is required. You are running version 2.8.12.2

需要升级 CMake !

那么,我们先卸载已有的cmake

yum remove cmake

 

直接下载二进制文件包,安装

cd /usr/tmp
wget https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz

tar zxvf cmake-3.10.2-Linux-x86_64.tar.gz
cd cmake-3.10.2-Linux-x86_64

 当前最新为 v3.19.2, 我没有使用最新版.

二进制文件包,安装,需要这样安装

你可以直接建立一个文件执行 以下命令, 也可以直接执行

vim install

输入待执行命令

#!/bin/bash
cp -r bin/* /usr/bin/
cp -r doc/* /usr/doc/
cp -r man/* /usr/local/man/
cp -r share/* /usr/share/

然后,执行

sh install

测试 

[root@wsvr cmake-3.10.2-Linux-x86_64]# make -version
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

OK, 安装好了,收工.

 

posted @ 2020-12-16 19:30  _Ong  阅读(2174)  评论(0编辑  收藏  举报