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
相关推荐
tntxia2 小时前
linux curl命令详解_curl详解
linux
扛枪的书生5 小时前
Linux 网络管理器用法速查
linux
见过夏天5 小时前
C++ 基础入门完全指南
c++
SkyWalking中文站6 小时前
认识 Horizon UI · 1/17:SkyWalking 新一代可观测性控制台
运维·前端·监控
顺风尿一寸8 小时前
Java Socket 内核之旅:从 SocketChannel.read() 到 tcp_recvmsg 与 epoll 的完整调用链路
linux
雪梨酱QAQ9 小时前
Kubeneters HA Cluster部署
运维
江华森14 小时前
Spring Cloud 微服务全栈实战:从 Eureka 到 Docker Compose 一文贯通
运维
江华森14 小时前
Matplotlib 数据绘图基础入门
运维
XIAOHEZIcode14 小时前
Ubuntu 终端美化全栈指南:Bash 到 Kitty 踩坑实录
linux·ubuntu·命令行
江华森14 小时前
NumPy 数值计算基础入门
运维