【问题标题】:Postgres create POSTGIS extension error with CentOS 6Postgres 使用 CentOS 6 创建 POSTGIS 扩展错误
【发布时间】:2013-12-23 07:02:07
【问题描述】:

我在CentOS 6.3 上运行PostgreSQL 9.3Postgis 2.0

我按照以下说明安装了 PostgreSQL 和 PostGIS: http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS21CentOS6pgdg

尝试创建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

我可以知道如何成功安装 POSTGIS 扩展吗?

【问题讨论】:

  • 最近在CentOS 6.5 x64上成功安装了postgresql-9.3、postgis2.1,没有任何问题。仅供参考。

标签: postgresql centos postgis


【解决方案1】:

您是否尝试过安装包含 libhdf5 的软件包,然后再次尝试运行 create extension 命令?显然 postgis 链接到您系统上不存在的那个包。

【讨论】:

  • 我可以知道包名在centos repo中包含libhdf5吗?
【解决方案2】:

我有 CentOs 6.5 并且这样做了:

1) 安装以下软件包

  • hdf5-1.8.11-42.1.x86_64.rpm
  • json-c-0.10-2.1.x86_64.rpm
  • libhdf5-8-1.8.11-42.1.x86_64.rpm
  • libhdf5_hl8-1.8.11-42.1.x86_64.rpm

不知道这里能不能直接链接文件,所以去rpm.pbone.net找那些文件,下载CentOS 6版本。

2) 由于 Postgis 需要版本 hdf5 版本 6,因此您必须以 root 身份执行此命令(# 是提示符)

# cd /usr/lib64
# ln -s libhdf5_hl.so.8 libhdf5_hl.so.6
# ln -s libhdf5.so.8 libhdf5.so.6

PS 不要忘记安装 postgresql contrib 包,因为 Postgis 需要为某些模块扩展模糊字符串。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-10-09
    • 1970-01-01
    • 1970-01-01
    • 2020-02-26
    • 2020-07-24
    • 2018-02-27
    • 1970-01-01
    相关资源
    最近更新 更多