运行'make'命令后,我收到以下错误。
[ 0%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/matmul.o
c++: error: -pg and -fomit-frame-pointer are incompatible
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/matmul.o] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2
我正在关注http://mitchtech.net/raspberry-pi-opencv/链接上的教程。
在做make之前我做了cmake时失踪了以下:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON ..
-- Detected version of GNU GCC: 46 (406)
-- checking for module 'gstreamer-app-0.10'
-- package 'gstreamer-app-0.10' not found
-- checking for module 'gstreamer-video-0.10'
-- package 'gstreamer-video-0.10' not found
-- checking for module 'libswscale'
-- package 'libswscale' not found
-- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR)
-- Use NumPy headers from: /usr/lib/pymodules/python2.7/numpy/core/include
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named sphinx
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "4.0")
-- Parsing 'cvconfig.h.cmake'
有人可以解释一下发生了什么,解决方案是什么?我是OpenCV和R-Pi的新手。
答案 0 :(得分:1)
点击链接后,您“按原样”将解决此问题。
缺少一些必要的包,因此错误。
在编译OpenCV之前输入以下命令进行安装。您必须拥有有效的网络连接!
sudo apt-get -y install build-essential cmake cmake-qt-gui pkg-config libpng12-0 libpng12-dev libpng ++ - dev libpng3 libpnglite-dev zlib1g-dbg zlib1g zlib1g-dev pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools
sudo apt-get -y install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-progs ffmpeg libavcodec-dev libavcodec53 libavformat53 libavformat-dev libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev libxine1-ffmpeg libxine-dev libxine1-bin libunicap2 libunicap2-dev libdc1394-22-dev libdc1394-22 libdc1394-utils swig libv4l-0 libv4l-dev python-numpy libpython2.6 python-dev python2.6-dev libgtk2.0-dev pkg-config