2

When I try to enable PostGis extension on my database I receive the following:

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

I used find -name to find the files:

[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
Erwin Brandstetter
  • 605,456
  • 145
  • 1,078
  • 1,228
  • Which operating system are you running? You might find an answer [here](http://stackoverflow.com/questions/20415239/postgres-create-postgis-extension-error-with-centos-6) -- but without more details I can't advise further. – ProgrammerDan Mar 29 '14 at 02:47
  • CentOS, Ruby on rails 3, ruby 1.9.3 – user3474547 Mar 29 '14 at 05:31
  • That's unfortunate, I'm guessing you've found most of the other help I've seen which is that there appear to be issues installing in CentOS. However, [this looks most useful](http://stackoverflow.com/questions/18768644/error-when-trying-to-run-create-extension-postgis?rq=1) and [this may also help, although not about CentOS](http://stackoverflow.com/questions/17915928/error-when-installing-postgis-extension-to-postgresql-database?rq=1). Sorry I can't help further, I don't use CentOS much because of issues like this... – ProgrammerDan Mar 29 '14 at 12:42

1 Answers1

1

Credit to Thinking Monkey @ on this post

it is for fordora 15. But i tried everything else and this actually fixed my issue and allowed me to install the postgis extentions. Doesn't take long to install.

Thinking Monkeys Post:

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.
Community
  • 1
  • 1