当前位置: 首页 > news >正文

20231108在Ubuntu22.04下编译安装cmake-3.27.7.tar.gz

20231108在Ubuntu22.04下编译安装cmake-3.27.7.tar.gz
2023/11/8 17:28


缘起,编译cv180zb的时候提示说cmake的版本低!

 OBJCOPY   platform/generic/firmware/payloads/test.bin
 OBJCOPY   platform/generic/firmware/fw_dynamic.bin
 OBJCOPY   platform/generic/firmware/fw_jump.bin
 OBJCOPY   platform/generic/firmware/fw_payload.bin
make[1]: Leaving directory '/home/rootroot/C102/cvitek_sdk_v4.1.0.2/opensbi'
  [TARGET] rtos 
cd /home/rootroot/C102/cvitek_sdk_v4.1.0.2/freertos/cvitek && ./build_cv180x.sh
~/C102/cvitek_sdk_v4.1.0.2/freertos/cvitek/build/task ~/C102/cvitek_sdk_v4.1.0.2/freertos/cvitek
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.16.5 or higher is required.  You are running version 3.16.3


-- Configuring incomplete, errors occurred!
make: *** [scripts/rtos.mk:3: rtos] Error 1
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C102/cvitek_sdk_v4.1.0.2$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C102/cvitek_sdk_v4.1.0.2$ cmake
Usage

  cmake [options] <path-to-source>
  cmake [options] <path-to-existing-build>
  cmake [options] -S <path-to-source> -B <path-to-build>

Specify a source directory to (re-)generate a build system for it in the
current working directory.  Specify an existing build directory to
re-generate its build system.

Run 'cmake --help' for more information.

rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C102/cvitek_sdk_v4.1.0.2$ cmake --version
cmake version 3.16.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C102/cvitek_sdk_v4.1.0.2$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C102/cvitek_sdk_v4.1.0.2$ sudo apt-get install cmake
[sudo] password for rootroot: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
cmake is already the newest version (3.16.3-1ubuntu1.20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 101 not upgraded.
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C102/cvitek_sdk_v4.1.0.2$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C102/cvitek_sdk_v4.1.0.2$ sudo apt-get install cmake3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package cmake3
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C102/cvitek_sdk_v4.1.0.2$ sudo apt-get install cmake3.16.5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package cmake3.16.5
E: Couldn't find any package by glob 'cmake3.16.5'
E: Couldn't find any package by regex 'cmake3.16.5'
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/C102/cvitek_sdk_v4.1.0.2$ 


rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/cmake-3.27.7$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/cmake-3.27.7$ cat /etc/issue
Ubuntu 20.04.5 LTS \n \l

rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/cmake-3.27.7$ 


百度:
  CMake 3.16.5 or higher is required.  You are running version 3.16.3


https://blog.csdn.net/qq_42170079/article/details/130770771
cmake版本过低安装新版本

BC!

于 2023-05-22 15:09:11 发布

阅读量552
 收藏 1

点赞数
文章标签: bash linux 开发语言
版权
CMake Error at CMakeLists.txt:4 (CMAKE_MINIMUM_REQUIRED):
CMake 3.10 or higher is required. You are running version 3.5.1

1.删除久的cmake可执行文件
/usr/bin  sudo rm cmake 

2.下载新版本也可以在官网下载
wget http://www.cmake.org/files/v3.16/cmake-3.16.6.tar.gz
wget https://github.com/Kitware/CMake/releases/download/v3.27.7/cmake-3.27.7.tar.gz

3.运行./configure 文件
./configure

4.编译【单线程花了我10分钟+】
make -j12

5.安装
sudo make install -j12

6.查看安装是否完成
cmake --version

7.软连接可执行文件
sudo ln -s /usr/local/bin/cmake /usr/bin


参考资料:
https://cmake.org/download/
Source distributions:
Platform    Files
Unix/Linux Source (has \n line feeds)    cmake-3.27.7.tar.gz
Windows Source (has \r\n line feeds)    cmake-3.27.7.zip

http://www.lryc.cn/news/225056.html

相关文章:

  • 如此理解sed会简单
  • 数据库-MySQL之数据库必知必会1-9章
  • Selenium+Python自动化测试环境搭建
  • k8s存储卷 PV和PVC
  • 【架构】后端项目经典分层架构介绍
  • 二叉树的中序遍历
  • 什么是代理IP池?真实测评IP代理商的IP池是否真实?
  • 接收表单数据
  • 串口通信(11)-CRC校验介绍算法
  • 什么是Java虚拟机(JVM),它的作用是什么?
  • 力扣876:链表的中间结点
  • 三菱FX3U系列—原点回归指令
  • ES常用查询命令
  • 【Qt之元对象系统】
  • 基于FPGA的EMAC模块与FIFO模块:高速数据传输与存储
  • 大数据毕业设计选题推荐-农作物观测站综合监控平台-Hadoop-Spark-Hive
  • 高校教务系统登录页面JS分析——长沙理工大学教务系统
  • element-ui的form校验失败
  • java数据结构--阻塞队列
  • 使用p2p实现Linux内网快速分发文件
  • Android Studio报错:connect refused
  • ubuntu 源码编译安装make过程很慢问题解决
  • 深度学习 opencv python 实现中国交通标志识别 计算机竞赛
  • 希尔排序原理
  • 测试用例的设计方法(全):判定表驱动分析方法
  • node 第十七天 使用rsa非对称加密 实现前后端加密通信 JSEncrypt和node-rsa
  • Spring-依赖注入findAutowireCandidates源码实现
  • 单页面应用与多页面应用的区别?
  • 模型预处理的ToTensor和Normalize
  • nodejs express multer 保存文件名为中文时乱码,问题解决 originalname