2014-03-28 112 views
1

當我試圖讓我的數據庫PostGIS的擴展我收到以下:PostGIS的擴展安裝PostgreSQL

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 

我曾經找-name查找文件:

[[email protected] /]# find -name rtpostgis-2.1.so 
./usr/pgsql-9.3/lib/rtpostgis-2.1.so 

[[email protected] /]# 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 
+0

何種操作系統,你運行?您可能會在這裏找到答案(http://stackoverflow.com/questions/20415239/postgres-create-postgis-extension-error-with-centos-6) - 但沒有更多的細節,我不能進一步建議。 – ProgrammerDan

+0

CentOS,Ruby on rails 3,ruby 1.9.3 – user3474547

+0

這很不幸,我猜你已經找到了我見過的大部分其他幫助,這是在CentOS中似乎有安裝問題。然而,[這看起來最有用](http://stackoverflow.com/questions/18768644/error-when-trying-to-run-create-extension-postgis?rq=1)和[這也可以幫助,雖然不是關於CentOS](http://stackoverflow.com/questions/17915928/error-when-installing-postgis-extension-to-postgresql-database?rq=1)。對不起,我不能進一步,因爲這樣的問題,我不使用CentOS ... – ProgrammerDan

回答

0

感謝思考猴@關於這個post

它是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. 
+0

其尋找.6但我的libhdf5文件都是.7 – radtek