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]
cmake [options]
cmake [options] -S
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