Ubuntu安装opencv编译make出错
我用的是Ubuntu10.04版本的,装的是opencv2.4.13,可以cmake过去,但是make时出现以下问题:
[ 11%] Built target pch_Generate_opencv_imgproc
[ 16%] Built target opencv_imgproc
[ 16%] Built target opencv_highgui_pch_dephelp
[ 16%] Built target pch_Generate_opencv_highgui
[ 16%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o
In file included from /home/Opencv/opencv-2.4.13/modules/highgui/src/cap_ffmpeg.cpp:45:0:
/home/Opencv/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp: In function ‘AVFrame* icv_alloc_picture_FFMPEG(int, int, int, bool)’:
/home/Opencv/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:1352:14: error: ‘AVFrame’ has no member named ‘format’
picture->format = pix_fmt;
^
/home/Opencv/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:1353:14: error: ‘AVFrame’ has no member named ‘width’
picture->width = width;
^
/home/Opencv/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp:1354:14: error: ‘AVFrame’ has no member named ‘height’
picture->height = height;
^
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
root@ubuntu:/home/Opencv/opencv-build# cd
root@ubuntu:~# apt-get install opencv
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package opencv
root@ubuntu:~#