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

asked 2020-11-29 13:02:04 -0600

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?

edit retag flag offensive close merge delete

Comments

ARM or PC? OS system, python?

supra56 gravatar imagesupra56 ( 2020-11-30 03:30:39 -0600 )edit

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

berak gravatar imageberak ( 2020-11-30 05:28:29 -0600 )edit