Hi, I was trying to install OpenCV, by using opencv.sh copied from the web page https://help.ubuntu.com/community/OpenCV. It is showing the following error while executing the command "make".
../../3rdparty/lib/liblibwebp.a: error adding symbols: File in wrong format collect2: error: ld returned 1 exit status modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/build.make:589: recipe for target 'lib/libopencv_imgcodecs.so.3.2.0' failed make[2]: * [lib/libopencv_imgcodecs.so.3.2.0] Error 1 CMakeFiles/Makefile2:3237: recipe for target 'modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/all' failed make[1]: [modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/all] Error 2 make[1]: ** Waiting for unfinished jobs....
..... .....
Makefile:160: recipe for target 'all' failed make: * [all] Error 2 sudo: checkinstall: command not found OpenCV 3.2.0 ready to be used
contents of opencv.sh file I used for this is shown below
version="$(wget -q -O - http://sourceforge.net/projects/opencvlibrary/files/opencv-unix | egrep -m1 -o '\"0-9+' | cut -c2-)" echo "Installing OpenCV" $version mkdir OpenCV cd OpenCV echo "Removing any pre-installed ffmpeg and x264" sudo apt-get -qq remove ffmpeg x264 libx264-dev echo "Installing Dependenices" sudo apt-get -qq install libopencv-dev build-essential checkinstall cmake pkg-config yasm libjpeg-dev libjasper-dev libavcodec-dev libavformat$ echo "Downloading OpenCV" $version wget -O OpenCV-$version.zip http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/$version/opencv-"$version".zip/download echo "Installing OpenCV" $version unzip OpenCV-$version.zip cd opencv-$version mkdir build cd build cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_TBB=ON -DBUILD_NEW_PYTHON_SUPPORT=ON -DWITH_V4L=ON -DINSTALL_C_EXAMP$
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules -DWITH_EIGEN=ON -$
make -j2 sudo checkinstall sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf' sudo ldconfig echo "OpenCV" $version "ready to be used"
Thanks in advance for the help.
Thanks & Regards, Sajeevan.K