I am trying to install OpenCV-3.1.0. I am following this tutorial: https://www.pyimagesearch.com/2015/10/26/how-to-install-opencv-3-on-raspbian-jessie/

I was on Step #4: Compile and install OpenCV when many errors occurred. This is the end of my .profile:

export PATH=/usr/local/bin:$PATH
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh

This is my cmake command:


I had issues with cmake but now they are fixed with some Googling.

I also had some issues with the make command but even some of them were fixed, exept this one. Here are the last few lines of my output:

[ 32%] Linking CXX shared library ../../lib/libopencv_photo.so
[ 32%] Built target opencv_photo
[ 32%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/fully_connected_layer.cpp.o
[ 32%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/im2col.cpp.o
[ 32%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/layers_common.cpp.o
[ 32%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/lrn_layer.cpp.o
[ 34%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/mvn_layer.cpp.o
[ 34%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/pooling_layer.cpp.o
[ 34%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/reshape_layer.cpp.o
[ 34%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/slice_layer.cpp.o
[ 34%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/softmax_layer.cpp.o
[ 34%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/split_layer.cpp.o
[ 34%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/torch/THDiskFile.cpp.o
[ 34%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/torch/THFile.cpp.o
[ 34%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/torch/torch_importer.cpp.o
[ 34%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/torch/THGeneral.cpp.o
[ 34%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/opencl_kernels_dnn.cpp.o
[ 34%] Linking CXX shared library ../../lib/libopencv_dnn.so
[ 34%] Built target opencv_dnn
make: *** [Makefile:163: all] Error 2

I have searched for similar posts, but all were "similar" and I didn't find anybody who had the same issue.

So I am stuck at 34%, and what does make: *** [Makefile:163: all] Error 2 mean?

Am I missing something or doing something wrong, I am kinda new to C++ compiling on Pi. How do I fix this issue? Please suggest me some steps. Thanks in advance.


I fixed it, turns out I was just using the wrong version. I did a complete re-install of Raspbian Buster and tried again, it worked

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.