4

I am running PostgreSQL 9.1 with Postgis 2.0 on Fedora 15.

When trying to install the raster support,

psql -d mydb -f rtpostgis.sql -v ON_ERROR_STOP=1

I get the following error

psql:rtpostgis.sql:46: ERROR:  
     could not load library "/usr/pgsql-9.1/lib/rtpostgis-2.0.so": libhdf5.so.6: 
     cannot open shared object file: No such file or directory

A locate libhdf5.so.6 gives the following paths.

/usr/lib64/mpich2/lib/libhdf5.so.6
/usr/lib64/mpich2/lib/libhdf5.so.6.0.4

Reinstalling the GDAL from the repositories did not solve the problem. The version of the installed GDAL.

gdal.x86_64                                1.7.3-14.fc15                @updates
6

You'll want to check that /etc/ld.so.conf has a referencence to the path /usr/lib64/mpich2/lib. If you add the path to ldo.so.conf, make sure to run ldconfig. You can then see what is in the ld cache using "ldconfig -p".

1
  • /etc/ld.so.conf had include ld.so.conf.d/*.conf one of the file was /etc/ld.so.conf.d/atlas-x8664.conf which contained /usr/lib64/atlas. A ldconfig -p | grep libhdf5 did not return anything. So I created a file gdal.conf and added the path /usr/lib64/mpich2/lib. Ran ldconfig. Now, ldconfig -p | grep libhdf5 had the paths to llibhdf5 files. After doing this, postgis raster suppot installation went smoothly. Thanks you for the input. Aug 9 '12 at 19:27
1

From my article: https://fmdojo.wordpress.com/2017/01/10/postgis-create-extension-error-cannot-find-libhdf5-so-6/

# find the lib if exist in OS filesystem
# returns: /usr/lib64/openmpi/lib/libhdf5.so.6
find / -name libhdf5.so.6

cd /etc/ld.so.conf.d/
nano postgis-fix.conf

# add to file:
/usr/lib64/openmpi/lib/

# Reload libs configs:
ldconfig

# check the lib:
ldconfig -p | grep libhdf5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.