ubuntu - 安装cmake

编译时提示

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

CMake 3.22 or higher is required. You are running version 3.10.2

-- Configuring incomplete, errors occurred!

大概意思就是编译使用cmake的最低版本是 3.22,我自己的是3.10.2。这里记录的是编译cmake替换成3.22的步骤。(以下注意是在root下操作的,或者每次执行前多加个 sudo )

1、下载 cmake 3.22

wget https://cmake.org/files/v3.22/cmake-3.22.0.tar.gz

2、解压编译

:~/lichang/android#tar zxvf cmake-3.22.0.tar.gz

:~/lichang/android#cd cmake-3.22.0

:~/lichang/android/cmake-3.22.0#./configure

:~/lichang/android/cmake-3.22.0#make

:~/lichang/android/cmake-3.22.0#make install

:~/lichang/android/cmake-3.22.0# cmake --version

cmake version 3.22.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).

下载版本的地址如下:

Index of /files

相关推荐
未济1 天前
linux 配置环境变量
linux
傲世仙尊1 天前
目录即文件-Ext文件系统收尾篇
linux·c语言
虎头金猫1 天前
4K 视频总卡在公网带宽?用 N1 + OpenList 把网盘播放链路重新理顺
运维·服务器·网络·python·容器·beautifulsoup·pandas
_艾伦 耶格尔.2 天前
进程间通信
linux
AI职业加油站2 天前
AI智能体应用工程师证书:政策红利下的职业新风口
大数据·运维·人工智能·学习·职场发展
Liuqy-052 天前
Linux IO编程——静态库、动态库
linux
此冬歌咏2 天前
K8s 节点故障实战:优雅驱逐 31 秒,硬故障 331 秒,以及那个永远 Pending 的 Pod
运维·k8s
彧azz2 天前
Linux 环境下 Redis 学习总结:数据类型、持久化、锁、事务、主从与缓存问题
linux·redis·笔记·学习·面试
-梅2 天前
linux(8) 软硬链接
linux·运维·服务器
AIgorithmGEEK2 天前
[Linux]线程三部曲(上):一个执行流的诞生——从操作系统一路拆到 pthread_create
linux·线程·pid