安装opencv失败-粘贴CMakeError.log的内容

installing opencv failed- pasting the contents of CMakeError.log

本文关键字:log CMakeError 粘贴 opencv 失败 安装      更新时间:2023-10-16

我尝试了以下

sudo apt-get update  
sudo apt-get upgrade  
sudo apt-get install build-essential cmake unzip pkg-config  
sudo apt-get install libjpeg-dev libpng-dev libtiff-dev  
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev  
sudo apt-get install libxvidcore-dev libx264-dev  
sudo apt-get install libgtk-3-dev  
sudo apt-get install libatlas-base-dev gfortran  
sudo apt-get install python3-dev    
cd ~  
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.0.0.zip  
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.0.0.zip  
unzip opencv.zip  
unzip opencv_contrib.zip  
mv opencv-4.0.0 opencv  
mv opencv_contrib-4.0.0 opencv_contrib  
wget https://bootstrap.pypa.io/get-pip.py  
sudo python3 get-pip.py  
sudo pip install virtualenv virtualenvwrapper  
sudo rm -rf ~/get-pip.py ~/.cache/pip  
export WORKON_HOME=$HOME/.virtualenvs  
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3  
source /usr/local/bin/virtualenvwrapper.sh  
echo -e "n# virtualenv and virtualenvwrapper" >> ~/.bashrc  
echo "export WORKON_HOME=$HOME/.virtualenvs" >> ~/.bashrc  
echo "export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3" >> ~/.bashrc  
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc  
source ~/.bashrc  
mkvirtualenv cv -p python3  
workon cv  
pip install numpy  
cd ~/opencv  
mkdir build  
cd build  

然后我试着用命令编译opencv

cmake-D cmake_BUILD_TYPE=RELEASE-D cmake_INSTALL_PRIFIX=/usr/local-D INSTALL_PYTHON_EXAMPLES=打开-D INSTALL_C_EXAMPLES=关闭-D OPENCV_ENABLE_NONFREE=打开-DOPENCV_EXTRA_MODULES_PATH=~/OPENCV_contrib/MODULES-DPYTHON_EXECUTABLE=~/.virtualenvs/cv/bin/PYTHON-D BUILD_EXAMPLES=打开。。我再次下载,它正在编译中。早些时候,我下载到下载文件夹。现在我下载到主文件夹。现在编译得很好。以下错误不存在。但我得到错误
--配置不完整,出现错误
另请参阅"home/sandep/Downloads/opencv/build/CMakeFiles/CMakeOutput.log">
另请参阅"home/sandep/Downloads/opencv/build/CMakeFiles/CMakeError.log";。

一些文本被删除
CMakeError.log 的内容

Build output check failed:
Regex: 'unrecognized .*option'
Output line: 'cc1plus: warning: unrecognized command line option ‘-Wno-shorten-64-to-32’'
Compilation failed:
source file: '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx'
check option: ' -Wno-shorten-64-to-32'
===== BUILD LOG =====
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_838ea/fast"
/usr/bin/make -f CMakeFiles/cmTC_838ea.dir/build.make CMakeFiles/cmTC_838ea.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_838ea.dir/src.cxx.o
/usr/bin/c++     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function  -O3 -DNDEBUG -fPIE   -Wno-shorten-64-to-32 -o CMakeFiles/cmTC_838ea.dir/src.cxx.o -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma   [-Wunknown-pragmas]
#pragma
^
cc1plus: warning: unrecognized command line option ‘-Wno-shorten-64-to-32’
Linking CXX executable cmTC_838ea
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_838ea.dir/link.txt --verbose=1
/usr/bin/c++      -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function  -O3 -DNDEBUG    -Wl,--gc-sections  CMakeFiles/cmTC_838ea.dir/src.cxx.o  -o cmTC_838ea 
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
===== END =====
Build output check failed:
Regex: 'unrecognized .*option'
Output line: 'cc1plus: warning: unrecognized command line option ‘-Wno-enum-compare-switch’'
Compilation failed:
source file: '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx'
check option: ' -Wno-enum-compare-switch'
===== BUILD LOG =====
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_668b1/fast"
/usr/bin/make -f CMakeFiles/cmTC_668b1.dir/build.make CMakeFiles/cmTC_668b1.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_668b1.dir/src.cxx.o
/usr/bin/c++     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function -Wno-invalid-offsetof  -O3 -DNDEBUG -fPIE   -Wno-enum-compare-switch -o CMakeFiles/cmTC_668b1.dir/src.cxx.o -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma   [-Wunknown-pragmas]
#pragma
^
cc1plus: warning: unrecognized command line option ‘-Wno-enum-compare-switch’
Linking CXX executable cmTC_668b1
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_668b1.dir/link.txt --verbose=1
/usr/bin/c++      -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function -Wno-invalid-offsetof  -O3 -DNDEBUG    -Wl,--gc-sections  CMakeFiles/cmTC_668b1.dir/src.cxx.o  -o cmTC_668b1 
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
===== END =====
Build output check failed:
Regex: 'unrecognized .*option'
Output line: 'cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’'
Compilation failed:
source file: '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx'
check option: ' -Wno-inconsistent-missing-override'
===== BUILD LOG =====
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_cbd2d/fast"
/usr/bin/make -f CMakeFiles/cmTC_cbd2d.dir/build.make CMakeFiles/cmTC_cbd2d.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_cbd2d.dir/src.cxx.o
/usr/bin/c++     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function -Wno-invalid-offsetof -Wno-suggest-override  -O3 -DNDEBUG -fPIE   -Wno-inconsistent-missing-override -o CMakeFiles/cmTC_cbd2d.dir/src.cxx.o -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma   [-Wunknown-pragmas]
#pragma
^
cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’
Linking CXX executable cmTC_cbd2d
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_cbd2d.dir/link.txt --verbose=1
/usr/bin/c++      -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function -Wno-invalid-offsetof -Wno-suggest-override  -O3 -DNDEBUG    -Wl,--gc-sections  CMakeFiles/cmTC_cbd2d.dir/src.cxx.o  -o cmTC_cbd2d 
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
===== END =====
Build output check failed:
Regex: 'unrecognized .*option'
Output line: 'cc1plus: warning: unrecognized command line option ‘-Wno-implicit-fallthrough’'
Compilation failed:
source file: '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx'
check option: ' -Wno-implicit-fallthrough'
===== BUILD LOG =====
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_c8e77/fast"
/usr/bin/make -f CMakeFiles/cmTC_c8e77.dir/build.make CMakeFiles/cmTC_c8e77.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_c8e77.dir/src.cxx.o
/usr/bin/c++     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function -Wno-invalid-offsetof -Wno-suggest-override  -O3 -DNDEBUG -fPIE   -Wno-implicit-fallthrough -o CMakeFiles/cmTC_c8e77.dir/src.cxx.o -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma   [-Wunknown-pragmas]
#pragma
^
cc1plus: warning: unrecognized command line option ‘-Wno-implicit-fallthrough’
Linking CXX executable cmTC_c8e77
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c8e77.dir/link.txt --verbose=1
/usr/bin/c++      -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function -Wno-invalid-offsetof -Wno-suggest-override  -O3 -DNDEBUG    -Wl,--gc-sections  CMakeFiles/cmTC_c8e77.dir/src.cxx.o  -o cmTC_c8e77 
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
===== END =====
Build output check failed:
Regex: 'unrecognized .*option'
Output line: 'cc1: warning: unrecognized command line option ‘-Wno-implicit-fallthrough’'
Compilation failed:
source file: '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.c'
check option: ' -Wno-implicit-fallthrough'
===== BUILD LOG =====
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_0ad64/fast"
/usr/bin/make -f CMakeFiles/cmTC_0ad64.dir/build.make CMakeFiles/cmTC_0ad64.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_0ad64.dir/src.c.o
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG -fPIE   -Wno-implicit-fallthrough -o CMakeFiles/cmTC_0ad64.dir/src.c.o   -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.c
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.c:1:0: warning: ignoring #pragma   [-Wunknown-pragmas]
#pragma
^
cc1: warning: unrecognized command line option ‘-Wno-implicit-fallthrough’
Linking C executable cmTC_0ad64
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0ad64.dir/link.txt --verbose=1
/usr/bin/cc     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG    -Wl,--gc-sections  CMakeFiles/cmTC_0ad64.dir/src.c.o  -o cmTC_0ad64 
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
===== END =====
Build output check failed:
Regex: 'unrecognized .*option'
Output line: 'cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’'
Compilation failed:
source file: '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx'
check option: ' -Wno-unused-private-field'
===== BUILD LOG =====
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_84ab8/fast"
/usr/bin/make -f CMakeFiles/cmTC_84ab8.dir/build.make CMakeFiles/cmTC_84ab8.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_84ab8.dir/src.cxx.o
/usr/bin/c++     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-unused-function -Wno-deprecated-declarations -Wno-overloaded-virtual  -O3 -DNDEBUG -fPIE   -Wno-unused-private-field -o CMakeFiles/cmTC_84ab8.dir/src.cxx.o -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma   [-Wunknown-pragmas]
#pragma
^
cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’
Linking CXX executable cmTC_84ab8
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_84ab8.dir/link.txt --verbose=1
/usr/bin/c++      -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-unused-function -Wno-deprecated-declarations -Wno-overloaded-virtual  -O3 -DNDEBUG    -Wl,--gc-sections  CMakeFiles/cmTC_84ab8.dir/src.cxx.o  -o cmTC_84ab8 
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
===== END =====
Determining if the CL_VERSION_2_0 exist failed with the following output:
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_6a76e/fast"
/usr/bin/make -f CMakeFiles/cmTC_6a76e.dir/build.make CMakeFiles/cmTC_6a76e.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_6a76e.dir/CheckSymbolExists.c.o
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG -fPIE   -o CMakeFiles/cmTC_6a76e.dir/CheckSymbolExists.c.o   -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:47: fatal error: OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h: No such file or directory
compilation terminated.
CMakeFiles/cmTC_6a76e.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_6a76e.dir/CheckSymbolExists.c.o' failed
make[1]: *** [CMakeFiles/cmTC_6a76e.dir/CheckSymbolExists.c.o] Error 1
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_6a76e/fast' failed
make: *** [cmTC_6a76e/fast] Error 2
File /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef CL_VERSION_2_0
return ((int*)(&CL_VERSION_2_0))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the CL_VERSION_1_2 exist failed with the following output:
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_9c7fc/fast"
/usr/bin/make -f CMakeFiles/cmTC_9c7fc.dir/build.make CMakeFiles/cmTC_9c7fc.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_9c7fc.dir/CheckSymbolExists.c.o
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG -fPIE   -o CMakeFiles/cmTC_9c7fc.dir/CheckSymbolExists.c.o   -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:47: fatal error: OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h: No such file or directory
compilation terminated.
CMakeFiles/cmTC_9c7fc.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_9c7fc.dir/CheckSymbolExists.c.o' failed
make[1]: *** [CMakeFiles/cmTC_9c7fc.dir/CheckSymbolExists.c.o] Error 1
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_9c7fc/fast' failed
make: *** [cmTC_9c7fc/fast] Error 2
File /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef CL_VERSION_1_2
return ((int*)(&CL_VERSION_1_2))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the CL_VERSION_1_1 exist failed with the following output:
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_83bb4/fast"
/usr/bin/make -f CMakeFiles/cmTC_83bb4.dir/build.make CMakeFiles/cmTC_83bb4.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_83bb4.dir/CheckSymbolExists.c.o
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG -fPIE   -o CMakeFiles/cmTC_83bb4.dir/CheckSymbolExists.c.o   -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:47: fatal error: OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h: No such file or directory
compilation terminated.
CMakeFiles/cmTC_83bb4.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_83bb4.dir/CheckSymbolExists.c.o' failed
make[1]: *** [CMakeFiles/cmTC_83bb4.dir/CheckSymbolExists.c.o] Error 1
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_83bb4/fast' failed
make: *** [cmTC_83bb4/fast] Error 2
File /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef CL_VERSION_1_1
return ((int*)(&CL_VERSION_1_1))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the CL_VERSION_1_0 exist failed with the following output:
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_8c594/fast"
/usr/bin/make -f CMakeFiles/cmTC_8c594.dir/build.make CMakeFiles/cmTC_8c594.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_8c594.dir/CheckSymbolExists.c.o
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG -fPIE   -o CMakeFiles/cmTC_8c594.dir/CheckSymbolExists.c.o   -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:47: fatal error: OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h: No such file or directory
compilation terminated.
CMakeFiles/cmTC_8c594.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_8c594.dir/CheckSymbolExists.c.o' failed
make[1]: *** [CMakeFiles/cmTC_8c594.dir/CheckSymbolExists.c.o] Error 1
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_8c594/fast' failed
make: *** [cmTC_8c594/fast] Error 2
File /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef CL_VERSION_1_0
return ((int*)(&CL_VERSION_1_0))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the include file sys/videoio.h exists failed with the following output:
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_369b8/fast"
/usr/bin/make -f CMakeFiles/cmTC_369b8.dir/build.make CMakeFiles/cmTC_369b8.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_369b8.dir/CheckIncludeFile.c.o
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG -fPIE   -o CMakeFiles/cmTC_369b8.dir/CheckIncludeFile.c.o   -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:25: fatal error: sys/videoio.h: No such file or directory
compilation terminated.
CMakeFiles/cmTC_369b8.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_369b8.dir/CheckIncludeFile.c.o' failed
make[1]: *** [CMakeFiles/cmTC_369b8.dir/CheckIncludeFile.c.o] Error 1
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_369b8/fast' failed
make: *** [cmTC_369b8/fast] Error 2

您可以使用pip 安装打开的cv

pip install opencv-python

还可以使用pip 安装opencv-controib

pip install opencv-contrib-python

面临类似错误,并通过更正此路径解决

OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules

注意:如果你没有opencv_controib文件夹,你可以得到它

git clone https://github.com/opencv/opencv_contrib.git