Search code examples
hdf5gdalmacportsgmtdyld

GDAL: library not loasded libhdf5.100.dylib


I would like to run a GMT file wrote in tcsh environment. When I'm running it, I have the following error message :

dyld: Library not loaded: /opt/local/lib/libhdf5.100.dylib
Referenced from: /opt/local/lib/gmt4/bin/gmtset
Reason: image not found

I went to /opt/local/lib path, and indeed, libhdf5.103.dylib is installing, and not libhdf5.100.dylib. I did not find a way to reinstall libhdf5.100.dylib using port or brew.

The later doesn't work :

sudo port install libhdf5-100
sudo port install libhdf5.100
sudo port install libhdf5.100.dylib

I already try:

brew reinstall osgeo-gdal --build-from-source 

But, this doesn't work. I have the following issue:

Warning: You are using macOS 10.11.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this old version.

qt: macOS Sierra or newer is required.
Error: An unsatisfied requirement failed this build.

Do you have any ideas? Thank you.


Solution

  • Looks like gdal needs to be rebuilt with the current hdf5. You can try:

    sudo port uninstall gdal && sudo port install -s gdal

    This will build gdal from source and link against the installed HDF5 library.