Ask Your Question

sajeevank's profile - activity

2017-05-25 02:30:59 -0500 received badge  Scholar (source)
2017-05-24 00:44:12 -0500 received badge  Editor (source)
2017-05-24 00:18:19 -0500 asked a question Problem in installation of Opencv in ubuntu 16.04

Hi, I was trying to install OpenCV, by using copied from the web page 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/' failed
make[2]: *** [lib/] 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 file I used for this is shown below

version="$(wget -q -O - | egrep -m1 -o '\"[0-9](\.[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/opencv-"$version".zip/download
echo "Installing OpenCV" $version
unzip OpenCV-$
cd opencv-$version
mkdir build
cd build
make -j2
sudo checkinstall
sudo sh -c 'echo "/usr/local/lib" > /etc/'
sudo ldconfig
echo "OpenCV" $version "ready to be used"

Thanks in advance for the help.

Thanks & Regards, Sajeevan.K


I tried with another procedure in

For that cmake stage itself is failed. It is showing following messages.

-- Looking for pthread.h -- Looking for pthread.h - not found -- Check if the system is big endian -- Searching 16 bit integer -- Looking for sys/types.h -- Looking for sys/types.h - not found -- Looking for stdint.h -- Looking for stdint.h - not found -- Looking for stddef.h -- Looking for stddef.h - not found -- Check size of unsigned short -- Check size of unsigned short - failed -- Check size of unsigned int -- Check size of unsigned int - failed -- Check size of unsigned long -- Check size of unsigned long - failed CMake Error at /usr/share/cmake-3.5/Modules/TestBigEndian.cmake:51 (message): no suitable type found Call Stack (most recent call first): CMakeLists.txt:569 (test_big_endian)

-- Configuring incomplete, errors occurred! See also "/home/sajeevank/opencv/build/CMakeFiles/CMakeOutput.log". See also "/home/sajeevank/opencv/build/CMakeFiles/CMakeError.log".

I was suffering install opencv in ubuntu for two days. There are so many guides in net. But each procedure is failing at different stages.

Thanks for the help. Thanks and regards, Sajeevan.K