GDAL:库未加载 libhdf5。100.dylib

GDAL: library not loasded libhdf5.100.dylib

我想运行一个在tcsh环境下写的GMT文件。当我 运行 设置它时,出现以下错误消息:

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

我去了 /opt/local/lib 路径,确实,正在安装 libhdf5.103.dylib,而不是 libhdf5.100.dylib。我没有找到重新安装 libhdf5 的方法。100.dylib 使用端口或 brew。

后面的不行:

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

我已经试过了:

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

但是,这不起作用。我有以下问题:

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.

你有什么想法吗? 谢谢。

看起来 gdal 需要用当前的 hdf5 重建。你可以试试:

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

这将从源代码和 link 针对已安装的 HDF5 库构建 gdal。