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?
ARM or PC? OS system, python?
this is weird, it should build and try to link against a static zlib, if at all
did you have
BUILD_ZLIB
set in cmake ? or is it trying to use your os's zlib ? please try to find out