Ask Your Question

Revision history [back]

No rule to make target '/usr/local/lib/libz.so', needed by 'lib/libopencv_core.so.4.5.1

I want to build opencv along with opencv_contrib but I'm getting the following errors:

[ 12%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/matmul.avx512_skx.cpp.o
make[2]: *** No rule to make target '/usr/local/lib/libz.so', needed by 'lib/libopencv_core.so.4.5.1'.  Stop.
CMakeFiles/Makefile2:2930: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

Can anyone please tell me what's wrong?