【问题标题】:Postgis Extension install PostgreSQLPostgis 扩展安装 PostgreSQL
【发布时间】:2014-05-08 14:43:55
【问题描述】:

当我尝试在我的数据库上启用 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

【问题讨论】:

  • 您运行的是哪个操作系统?您可能会找到答案 here - 但如果没有更多详细信息,我无法提供进一步的建议。
  • CentOS,Ruby on rails 3,ruby 1.9.3
  • 很不幸,我猜你已经找到了我见过的大多数其他帮助,即在 CentOS 中安装似乎存在问题。但是,this looks most usefulthis may also help, although not about CentOS。抱歉,我帮不上忙,因为这样的问题,我很少使用 CentOS...

标签: postgresql postgis postgresql-extensions


【解决方案1】:

感谢 Thinking Monkey @post

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

Thinking Monkeys 帖子:

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.

【讨论】:

  • 它在寻找 .6 但我的 libhdf5 文件都是 .7
猜你喜欢
  • 1970-01-01
  • 2018-11-01
  • 2018-06-21
  • 2014-11-23
  • 2021-06-20
  • 2020-06-09
  • 1970-01-01
  • 2013-11-07
  • 2020-09-18
相关资源
最近更新 更多