2

当我尝试在我的数据库上启用 PostGis 扩展时,我收到以下信息:

postgis=# CREATE EXTENSION postgis;
ERROR:  could not load library "/usr/pgsql-9.3/lib/rtpostgis-2.1.so": libhdf5.so.6: cannot open shared object file: No such file or directory

我使用 find -name 来查找文件:

[root@digihaul3-pc /]# find -name rtpostgis-2.1.so
./usr/pgsql-9.3/lib/rtpostgis-2.1.so

[root@digihaul3-pc /]# find -name libhdf5.so.6
./usr/lib64/mpich2/lib/libhdf5.so.6
./usr/pgsql-9.3/lib/libhdf5.so.6
./usr/lib/mpich2/lib/libhdf5.so.6
4

1 回答 1

1

在这篇文章中感谢 Thinking Monkey @

它适用于 fordora 15。但是我尝试了其他所有方法,这实际上解决了我的问题并允许我安装 postgis 扩展。安装时间不长。

思考猴子帖子:

Checked for whether /etc/ld.so.conf has a reference to the path /usr/lib64/mpich2/lib.

by doing  ldconfig -p | grep libhdf5.

Which did not output anything.

On checking that /etc/ld.so.conf had  include ld.so.conf.d/*.conf.

Checked for the files in directory ld.so.conf.d. One of the conf file in include ld.so.conf.d was /etc/ld.so.conf.d/atlas-x8664.conf which contained /usr/lib64/atlas.

So I,

    created a file called gdal.conf in the directory ld.so.conf.d.
    Added the string /usr/lib64/mpich2/lib to the file.
    Ran ldconfig.
    Now, ldconfig -p | grep libhdf5 had the paths to llibhdf5 files.
    After doing the above, postgis raster support installation went smoothly.
于 2014-03-30T17:28:36.147 回答