1.报错
root@leno-System-Product-Name:/home/share/workspace/easyDK/ai_analysis# cd buildroot@leno-System-Product-Name:/home/share/workspace/easyDK/ai_analysis/build# cmake -D SDK=CAMBRICON ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenCV: /usr (found version "3.2.0") found components: core imgproc imgcodecs highgui videoio
CMake Error at thirdparty/glog/CMakeLists.txt:1 (cmake_minimum_required):
CMake 3.16 or higher is required. You are running version 3.10.2
-- Configuring incomplete, errors occurred!
See also "/home/share/workspace/easyDK/ai_analysis/build/CMakeFiles/CMakeOutput.log".
2.下载Cmake
到Cmake官网下载所需版本:https://cmake.org/files/v3.18/
我下载的是cmake-3.16.0,下载下来后需要进行解压安装;
tar xf cmake-3.16.0.tar.gz
cd cmake-3.16.0
3.将压缩文件成功提出后开始安装
cd cmake-3.18.3
./configure
make
sudo make install
cmake --version
遇到问题:root@leno-System-Product-Name:/home/share/workspace/easyDK/cmake-3.16.0# ./configure
---------------------------------------------
CMake 3.16.0, Copyright 2000-2019 Kitware, Inc. and Contributors
Found GNU toolchain
C compiler on this system is: gcc
C++ compiler on this system is: g++
Makefile processor on this system is: make
g++ has setenv
g++ has unsetenv
g++ does not have environ in stdlib.h
g++ has stl wstring
g++ has <ext/stdio_filebuf.h>
---------------------------------------------
make: 'cmake' is up to date.
loading initial cache file /home/share/workspace/easyDK/cmake-3.16.0/Bootstrap.cmk/InitialCacheFlags.cmake
-- 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)
CMake Error at Utilities/cmcurl/CMakeLists.txt:454 (message):
Could not find OpenSSL. Install an OpenSSL development package or
configure CMake with -DCMAKE_USE_OPENSSL=OFF to build without OpenSSL.
-- Configuring incomplete, errors occurred!
See also "/home/share/workspace/easyDK/cmake-3.16.0/CMakeFiles/CMakeOutput.log".
See also "/home/share/workspace/easyDK/cmake-3.16.0/CMakeFiles/CMakeError.log".
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
---------------------------------------------
解决方式:
使用指令apt-get install libssl-dev 安装openssl即可.
安装openssl后,再重新执行 ./configure 命令
4.将可执行文件重新复制到对应路径下
sudo cp /cmake-3.16.0/bin/cmake /usr/bin/
5.查看cmake版本
cmake -version