cmake版本升级(ubuntu18.04)

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
 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值