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 分钟前
Rancher
运维·rancher
小五传输2 分钟前
认准好用的跨网文件安全交换系统:安全传输与高效协作两全其美
大数据·运维·安全
chen_mangoo3 分钟前
Rockchip debian预置安装deb包
linux·驱动开发·嵌入式硬件
雪风飞舞4 分钟前
conda 常用命令
linux·windows·conda
Gofarlic_oms15 分钟前
从手动统计到自动化:企业AutoCAD许可管理进化史
大数据·运维·网络·人工智能·微服务·自动化
用户74712201169836 分钟前
linux最小版本编译-草稿(有空再来修改下)
linux
Xの哲學10 分钟前
Linux Select 工作原理深度剖析: 从设计思想到实现细节
linux·服务器·网络·算法·边缘计算
VekiSon11 分钟前
综合项目实战——电子商城信息查询系统
linux·c语言·网络·http·html·tcp·sqlite3
牛奶咖啡1312 分钟前
shell脚本编程(二)
linux·正则表达式·shell编程·正则表达式扩展·shell通配符·shell的变量·shell的引用