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
相关推荐
寒水馨10 分钟前
Linux下载、安装llama.cpp-b10068(附安装包llama-b10068-bin-ubuntu-vulkan-x64.tar.gz)
linux·ubuntu·llm·llama·本地部署·llama.cpp·推理引擎
JetComXCpp16 分钟前
给 Win32 窗口加上毛玻璃效果——纯 D3D11 实现,零依赖
c++
ysa0510302 小时前
【板子】二分答案(最大最小?)
c++·笔记·算法·板子
stolentime3 小时前
SP8549 MAIN75 - BST again题解
c++·算法·二叉树·深度优先·图论·记忆化搜索·组合数学
ziguo11223 小时前
C/C++ 错误处理全解:从 errno 到 C++ 异常
linux·c语言·c++·windows·visual studio
stolentime3 小时前
AT_pakencamp_2020_day1_k Gcd of Sum题解
c++·算法
2601_956121974 小时前
map_计蒜客T1271 完美K倍子数组
c++·算法
三8444 小时前
使用Samba/NFS实现文件共享/自动挂载共享目录/autofs自动挂载服务
linux·服务器·网络
高铭杰5 小时前
万物皆可KV(2)SurrealDB 存储布局分析
linux·服务器
王维同学5 小时前
IFEO Debugger、VerifierDlls 与 SilentProcessExit 配置
c++·windows·安全·注册表