Ask Your Question

Revision history [back]

No rule to make target '/usr/local/lib/libopencv_dnn.so.4.2.0'

Hello,

I'm on Ubuntu 19.10 with OpenCV 4.2. I don't have any NVidia card and I disabled WITH_CUDA during the build from source. The build completed without any error message. I confirmed that I have 4.2.0-dev by displaying the version under Python console.

I am trying to perform the first tutorial exercise - DisplayImage. I cut and pasted both files (DisplayImage.cpp and CMakeLists.txt) from the official documentation website. When I run make, i get the following error message:

make[2]: *** No rule to make target '/usr/local/lib/libopencv_dnn.so.4.2.0', needed by 'DisplayImage'.  Stop.

make[1]: * [CMakeFiles/Makefile2:73: CMakeFiles/DisplayImage.dir/all] Error 2 make: * [Makefile:84: all] Error 2

I do not need DNN for my initial self-paced learning exercises. What is the workaround to eliminate this error message? Many thanks for any guidance (since I must have done something wrong with my Ubuntu build).

Kind regards.

P.S. I repeated the OpenCV build on Raspberry Pi 2B (under Raspbian). I can run the DisplayImage exercise without a single error or warning message.