首页 > 解决方案 > GDAL:库未加载 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。我没有找到使用端口或 brew 重新安装 libhdf5.100.dylib 的方法。

后者不起作用:

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.

你有什么想法?谢谢你。

标签: hdf5gdalmacportsgmtdyld

解决方案


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

sudo 端口卸载 gdal && sudo 端口安装 -s gdal

这将从源代码构建 gdal 并链接到已安装的 HDF5 库。


推荐阅读