Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I am unable to build/install opencv for c++/python.

##### System information (version)

  • OpenCV => 3.3.0
  • Operating System / Platform => Linux Ubuntu 16.04 LTS
  • Build tool => cmake version 3.5.1 ; GNU Make 4.1

##### Detailed description

I have downloaded opencv and opencv_contrib as follows:

opencv : wget -O opencv.zip https://github.com/Itseez/opencv/archive/3.3.0.zip opencv_contrib : wget -O opencv_contrib.zip https://github.com/Itseez/opencv_contrib/archive/3.3.0.zip

##### Steps to reproduce

I am running the following commands:

cd opencv-3.3.0

mkdir build

sudo cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_PYTHON_EXAMPLES=ON -D INSTALL_C_EXAMPLES=OFF -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.3.0/modules -D PYTHON_EXECUTABLE=~/.virtualenvs/cv/bin/python -D BUILD_EXAMPLES=ON ..

make -j4

It fails on the last command, after building for 14%.

ERROR:

Scanning dependencies of target pch_Generate_opencv_ts Scanning dependencies of target pch_Generate_opencv_highgui /bin/sh: error while loading shared libraries: libc.so.6: cannot open shared object file: Operation not permitted modules/ts/CMakeFiles/pch_Generate_opencv_ts.dir/build.make:67: recipe for target 'modules/ts/precomp.hpp' failed make[2]: *** [modules/ts/precomp.hpp] Error 127 CMakeFiles/Makefile2:9975: recipe for target 'modules/ts/CMakeFiles/pch_Generate_opencv_ts.dir/all' failed make[1]: *** [modules/ts/CMakeFiles/pch_Generate_opencv_ts.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 14%] Generating precomp.hpp [ 14%] Generating precomp.hpp.gch/opencv_highgui_RELEASE.gch [ 14%] Built target pch_Generate_opencv_imgproc [ 14%] Built target pch_Generate_opencv_imgcodecs [ 14%] Built target pch_Generate_opencv_highgui Makefile:160: recipe for target 'all' failed make: *** [all] Error 2