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
相关推荐
RisunJan8 分钟前
Linux命令-modprobe(自动处理可载入模块)
linux·运维
小菜鸡桃蛋狗11 分钟前
C++——类和对象(下)
开发语言·c++
crescent_悦20 分钟前
C++:Highest Price in Supply Chain
开发语言·c++
feng_you_ying_li22 分钟前
底层实现map和set的第一步,AVL树的学习
c++
何朴尧34 分钟前
OpenClaw Linux 完整安装指南
linux
垫脚摸太阳39 分钟前
第 36 场 蓝桥·算法挑战赛·百校联赛---赛后复盘
数据结构·c++·算法
木木em哈哈44 分钟前
记一次在线编辑器的探索
linux·服务器·网络
Aaswk1 小时前
刷题笔记(回溯算法)
数据结构·c++·笔记·算法·leetcode·深度优先·剪枝
zhooyu1 小时前
GLM中lerp实现线性插值
c++·opengl