My system is Ubuntu 14.04. I tried many several methods to install OpenCV (tried both 2 and 3). I can not successfully install.
I followed [this documentation][1] for the installation and got this error.
UPDATE:
I reinstalled ffmpeg and x264. I have tried almost all the blogposts and official docs. This is the error I find:
UPDATE 2:
Please find the new error again here
UPDATE 3:
I upgraded to Ubuntu 16.04 and tried to reinstall OpenCV but it did not help. Find the error here:
/usr/bin/ld: cannot find -lSDL2 collect2: error: ld returned 1 exit status modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:256: recipe for target 'lib/libopencv_videoio.so.3.1.0' failed make[2]: * [lib/libopencv_videoio.so.3.1.0] Error 1 CMakeFiles/Makefile2:6364: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed make[1]: * [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: *** [all] Error 2