linux升级cmake

如果出现如下报错,就应该升级cmake了!

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):

CMake 3.1 or higher is required. You are running version 2.8.12.2

-- Configuring incomplete, errors occurred!

官网

可以下载各个版本的cmake: https://cmake.org/files/

升级

1.下载cmake,这里选择cmake-3.12.4,当然可以选择更新的版本:

进入https://cmake.org/files/v3.12/

选择cmake-3.12.4.tar.gz

2.解压后进入文件夹进行编译编译

bash 复制代码
./bootstrap
make
sudo make install

3.查看版本

bash 复制代码
cmake --version

打印如下,说明安装成功了!

cmake version 3.12.4

安装完后,发现make会出报错如下:

CMake Error: Could not find CMAKE_ROOT !!!

CMake has most likely not been installed correctly.

Modules directory not found in

/usr/local/bin

CMake Error: Error executing cmake::LoadCache(). Aborting.

bash 复制代码
hash -r

问题3

-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)

bash 复制代码
sudo yum install openssl-devel
相关推荐
apocelipes2 小时前
常用编程语言和库的正则表达式性能对比
c语言·c++·python·性能优化·golang·开发工具和环境
SkyWalking中文站4 小时前
认识 Horizon UI · 6/17:Trace 探索器
运维·监控·自动化运维
用户120487221616 小时前
Linux驱动编译与加载
linux·嵌入式
火车叼位7 小时前
写给初级开发者:SSL、SSH、HTTPS 与证书体系全解析
运维
用户8055336980312 小时前
Input 子系统架构:Core、Handler、Driver 三层是怎么协作的
linux·嵌入式
用户8055336980312 小时前
RK-Forge外设系列开篇 - 把板子从「能启动」变成「能用」:Ethernet/SPI/MMC 三个纯接线外设
linux·github·嵌入式
小猿姐19 小时前
唯品会大规模数据库云原生实践:基于 KubeBlocks 管理数千实例的统一运维之路
运维·elasticsearch·云原生
七歌杜金房1 天前
我终于又有了自己的 Linux 电脑
linux·debian·mac
SkyWalking中文站1 天前
认识 Horizon UI · 5/17:3D 基础设施地图
运维·监控·自动化运维
郝学胜_神的一滴2 天前
CMake 034:生成器表达式:解耦构建时序、精简分支逻辑的终极利器
c++·cmake