Cant run opencv apps after macOS Catalina update - hdf5 missing[SOLVED]

asked 2019-11-06 10:14:39 -0600

constantine gravatar image

updated 2019-11-08 20:30:00 -0600

supra56 gravatar image

I'm trying to compile and run an opencv program. I've previously built and used opencv 4 before I updated to macOS Catalina.

But now when I try to run my binary I get the following error:

    dyld: Library not loaded: @rpath/libhdf5.101.dylib
  Referenced from: /usr/local/lib/libopencv_hdf.4.0.0.dylib
  Reason: image not found
[1]    5054 abort      ./test

As far as I understand this, this means an opencv library tries to use another dynamic hdf5 library at runtime but the linker can't find it.

So I assume this library has been removed in the new macOS version.

How can I fix this? The only option I've found to install hdf5 is via brew, but that's a newer version. Do I need to get a newer version of opencv and built again from source?

edit retag flag offensive close merge delete

Comments

sudo ln -s /usr/local/lib/libhdf5.103.dylib /usr/local/lib/libhdf5.101.dylib

supra56 gravatar imagesupra56 ( 2019-11-06 13:10:44 -0600 )edit
1

thanks. that was helpful. I reinstalled anaconda and that was the problem. I've created a similar symlink and now it works again. I've posted a detailled description on stackoverflow

constantine gravatar imageconstantine ( 2019-11-07 01:29:34 -0600 )edit