Ask Your Question

Revision history [back]

Cant run opencv apps after macOS Catalina update - hdf5 missing

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?

Cant run opencv apps after macOS Catalina update - hdf5 missing

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?