Fork me on GitHub 0

CMake Error at CMakeLists.txt:11

cmake 安装https://cmake.org/files/v3.15/

sudo apt-get install build-essential
wget http://www.cmake.org/files/v3.5/cmake-3.5.2.tar.gz
tar xf cmake-3.5.2.tar.gz
cd cmake-3.5.2
./configure
make

sudo apt-get install checkinstall
sudo checkinstall

sudo make install

cmake --version

  

 

执行cmake的时候出现下列错误

CMake Error at CMakeLists.txt:11 (message):
  
 
  FATAL: In-source builds are not allowed.
 
         You should create separate directory for build files.
 
 
 
-- Configuring incomplete, errors occurred!

  则安装后先不要cmake

按照下列安装

$ cd opencv
 
$ mkdir build
 
$ cd build
 
$ cmake ..
 
$ make -j 10

  替换安装的版本

sudo make install

  

posted @ 2020-11-12 09:54  amazingcode  阅读(3657)  评论(0编辑  收藏  举报