Postgres create POSTGIS extension error with CentOS 6

天涯浪子 提交于 2019-12-24 14:26:32

问题


I am running PostgreSQL 9.3 with Postgis 2.0 on CentOS 6.3.

I installed PostgreSQL and PostGIS according to this instructions: http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS21CentOS6pgdg

When trying to create Postgis extension

Create Extension Postgis;

I get the following error,

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

May I know how to install the POSTGIS extension successfully?


回答1:


I have CentOs 6.5 and did this:

1) Install following packages

  • 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

I don't know if I can link files directly here, so look for those files at rpm.pbone.net, download CentOS 6 version.

2) As Postgis requires version hdf5 version 6, you have to execute this commands as root (# is prompt)

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

PS Don't forget to install postgresql contrib package, as Postgis requires fuzzystrmatch extension for some modules.




回答2:


Have you tried installing the package that contains libhdf5 and then tried running again the create extension command? Apparently postgis is linked to that package which is not present on your system.



来源:https://stackoverflow.com/questions/20415239/postgres-create-postgis-extension-error-with-centos-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!