cmake opencv for contrib - 配置不完整,发生错误
cmake opencv for contrib - Configuring incomplete, errors occurred
我已经在我的机器上安装了opencv。我现在正在尝试安装一个额外的模块。但它失败了,我不明白我做错了什么。
我正在尝试执行以下命令:
$ cd <opencv_build_directory>
$ cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory>
$ make -j5
来源: https://github.com/opencv/opencv_contrib
但是当我尝试执行此操作时:
cmake
-DOPENCV_EXTRA_MODULES_PATH=/home/yalishanda/Downloads/opencv_contrib-master/modules -D CMAKE_INSTALL_PREFIX=/usr/local ..
我得到:
-- Detected version of GNU GCC: 54 (504)
-- Found ZLIB: /usr/lib/i386-linux-gnu/libz.so (found suitable version "1.2.8", minimum required is "1.2.3")
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR)
-- Found ZLIB: /usr/lib/i386-linux-gnu/libz.so (found version "1.2.8")
CMake Warning at cmake/OpenCVFindLibsGUI.cmake:18 (find_package):
By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Core", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Core" with any
of the following names:
Qt5CoreConfig.cmake
qt5core-config.cmake
Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
"Qt5Core_DIR" to a directory containing one of the above files. If
"Qt5Core" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:535 (include)
CMake Warning at cmake/OpenCVFindLibsGUI.cmake:19 (find_package):
By not providing "FindQt5Gui.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Gui", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Gui" with any
of the following names:
Qt5GuiConfig.cmake
qt5gui-config.cmake
Add the installation prefix of "Qt5Gui" to CMAKE_PREFIX_PATH or set
"Qt5Gui_DIR" to a directory containing one of the above files. If "Qt5Gui"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:535 (include)
CMake Warning at cmake/OpenCVFindLibsGUI.cmake:20 (find_package):
By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Widgets", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Widgets" with
any of the following names:
Qt5WidgetsConfig.cmake
qt5widgets-config.cmake
Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
"Qt5Widgets_DIR" to a directory containing one of the above files. If
"Qt5Widgets" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:535 (include)
CMake Warning at cmake/OpenCVFindLibsGUI.cmake:21 (find_package):
By not providing "FindQt5Test.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Test", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Test" with any
of the following names:
Qt5TestConfig.cmake
qt5test-config.cmake
Add the installation prefix of "Qt5Test" to CMAKE_PREFIX_PATH or set
"Qt5Test_DIR" to a directory containing one of the above files. If
"Qt5Test" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:535 (include)
CMake Warning at cmake/OpenCVFindLibsGUI.cmake:22 (find_package):
By not providing "FindQt5Concurrent.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5Concurrent", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Concurrent"
with any of the following names:
Qt5ConcurrentConfig.cmake
qt5concurrent-config.cmake
Add the installation prefix of "Qt5Concurrent" to CMAKE_PREFIX_PATH or set
"Qt5Concurrent_DIR" to a directory containing one of the above files. If
"Qt5Concurrent" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
CMakeLists.txt:535 (include)
-- Checking for module 'gstreamer-video-1.0'
-- No package 'gstreamer-video-1.0' found
-- Checking for module 'gstreamer-app-1.0'
-- No package 'gstreamer-app-1.0' found
-- Checking for module 'gstreamer-riff-1.0'
-- No package 'gstreamer-riff-1.0' found
-- Checking for module 'gstreamer-pbutils-1.0'
-- No package 'gstreamer-pbutils-1.0' found
-- Checking for module 'gstreamer-base-0.10'
-- No package 'gstreamer-base-0.10' found
-- Checking for module 'gstreamer-video-0.10'
-- No package 'gstreamer-video-0.10' found
-- Checking for module 'gstreamer-app-0.10'
-- No package 'gstreamer-app-0.10' found
-- Checking for module 'gstreamer-riff-0.10'
-- No package 'gstreamer-riff-0.10' found
-- Checking for module 'gstreamer-pbutils-0.10'
-- No package 'gstreamer-pbutils-0.10' found
-- Checking for module 'libdc1394-2'
-- No package 'libdc1394-2' found
-- Checking for module 'libdc1394'
-- No package 'libdc1394' found
-- Checking for module 'libv4l1'
-- No package 'libv4l1' found
-- Checking for module 'libv4l2'
-- No package 'libv4l2' found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Checking for module 'libavcodec'
-- No package 'libavcodec' found
-- Checking for module 'libavformat'
-- No package 'libavformat' found
-- Checking for module 'libavutil'
-- No package 'libavutil' found
-- Checking for module 'libswscale'
-- No package 'libswscale' found
-- Checking for module 'libavresample'
-- No package 'libavresample' found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- Checking for module 'libgphoto2'
-- No package 'libgphoto2' found
-- On 32-bit Linux IPP can not currently be used with dynamic libs because of linker errors. Set BUILD_SHARED_LIBS=OFF
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.12", minimum required is "2.7")
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.5.1", minimum required is "3.4")
-- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version "3.5.1")
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'numpy'
-- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
-- Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Caffe: NO
-- Protobuf: NO
-- Glog: NO
CMake Error at cmake/OpenCVUtils.cmake:857 (file):
file MD5 failed to read file
"/home/yalishanda/Downloads/opencv-3.1.0/3rdparty/tinydnn/": Success
Call Stack (most recent call first):
/home/yalishanda/Downloads/opencv_contrib-master/modules/dnn_modern/CMakeLists.txt:20 (ocv_download)
-- Downloading ...
CMake Error at cmake/OpenCVUtils.cmake:895 (file):
file DOWNLOAD cannot open file for write.
Call Stack (most recent call first):
/home/yalishanda/Downloads/opencv_contrib-master/modules/dnn_modern/CMakeLists.txt:20 (ocv_download)
CMake Error at cmake/OpenCVUtils.cmake:899 (message):
Failed to download . Status=
Call Stack (most recent call first):
/home/yalishanda/Downloads/opencv_contrib-master/modules/dnn_modern/CMakeLists.txt:20 (ocv_download)
-- Configuring incomplete, errors occurred!
See also "/home/yalishanda/Downloads/opencv-3.1.0/CMakeFiles/CMakeOutput.log".
See also "/home/yalishanda/Downloads/opencv-3.1.0/CMakeFiles/CMakeError.log".
有人可以解释我可能做错了什么吗?
我尝试按如下方式安装 qt5,但这些错误仍然存在:
sudo apt-get remove qt5-default qttools5-dev-tools && sudo apt-get autoremove && sudo apt-get clean && sudo apt-get autoclean
sudo apt-get install qt5-default qttools5-dev-tools
确保对opencv_contrib
模块使用与主opencv
库相同的版本。您似乎正在使用版本3.1.0
,用于可以下载相应opencv_contrib
的主库(此处(。
关于QT部分,它看起来像一个警告,但是您可以检查是否安装libqt5gui5
,libqt5concurrent5
和libqt5widgets5
可以解决这个问题。
如果仍然存在错误,请尝试删除导致这些错误的模块(例如tinydnn
和dnn_modern
(。
相关文章:
- "error: no matching function for call to"构造函数错误
- Arduino:for/while/if在void setup()或void loop()之前?——错误:之前需要不合格
- 设置 Visual Studio for MPI: 找不到标识符错误
- "no matching function for call to 'Vector::Vector'"错误
- 错误消息:使用"string* +="后"no match for 'operator+='"
- C++模板错误:"invalid explicitly-specified argument for template parameter"
- 如何修复输出日志中的"EnableInput can only be specified on a Pawn for its Controller"错误
- 在 Eclipse: "error: no match for 'operator='" 中获取错误消息
- C++生成文件错误"implicit entry/start for main executable"
- 学习 c++,编译错误"no matching function for call"
- For 循环 C++ 中的值错误
- 为什么我的 for 循环给出错误:X 没有命名类型
- 类方法 - 数据结构中 For 循环的运行时错误
- 试图避免在 for 循环中出现 if-else 语句,但代码似乎有一些错误
- 如何'Invalid conversion'和'no match for operator'更正这些 c++ 错误
- 为什么当我没有变量或其他任何命名的东西时"no match for 'operator==' "错误?
- 结构错误:"no matching function for call to "
- Mongdb C++ 驱动程序编译错误 for document{}.
- Matlab 编码器错误 "for loop index expressions.." 如何修改代码?
- 语法错误/ for循环