Could not find libhdf5.so.6 during CREATE EXTENSION postgis - postgresql

i tried to create extension for postgis in postgresql 9.5. I've already follow from here
But it doesn't work like i expected. I got error ERROR: could not load library "/usr/pgsql-9.5/lib/rtpostgis-2.2.so": libhdf5.so.6: cannot open shared object file: No such file or directory when i execute CREATE EXTENSION postgis
I have had install this on my other machine which run ubuntu. But this machine using centos 6. am i missing something? please help.

Looks like the package you need is hdf5
There have been a fair number of problems reported with this library (a quick google search is helpful), but you may try making sure you can find libhdf5.so.6 on your system and if not reinstalling the rpm.
If that doesn't work, build the library from source or find an alternate version for download?

Related

How do I install the pg_cron extension in Postgres 13 hosted in my Windows 10

I see a few guides for installing the pg_cron extension in windows, but its very confusing. Is there any guide that can help?
A simple create extension in the database doesnt work. I get the below error :
ERROR: could not open extension control file "C:/Program Files/PostgreSQL/13/share/extension/pg_cron.control": No such file or directory
SQL state: 58P01
You have to install the extension first.
Since you are using Windows, things will get complicated. You need a C compiler and build instructions from source. There are no such build instructions available, but somebody has managed to do it before and suggested modifications that were never merged.
Based on this and my personal experience with pg_cron bugs, I have the feeling that Microsoft doesn't care for this project very much, and that you will have a hard time getting it to run on Windows.
Alternatively, you could try your luck with pg_timetable, but you'd have to build that from source too.
You might end up using pgAgent, for which pre-built Windows binaries exist.

Postgresql 12 doesn´t find PostGIS extension on CentOS 8

I´m trying to get PostGIS working, but it seems that Postgresql doesn´t find the extension. My server is running on CentOS 8, the Postgresql is version 12. I installed Postgresql 12 first via dnf module enable postgresql:12 etc..
Afterwards I installed PostGIS and followed the description on the PostGIS website (https://people.planetpostgresql.org/devrim/index.php?/archives/102-Installing-PostGIS-3.0-and-PostgreSQL-12-on-CentOS-8.html). But when I try to run CREATE EXTENSION postgis; I get the error ERROR: could not access file "$libdir/postgis-3": No such file or directory SQL state: 58P01 I figured out that the needed files reside in a subdirectory "bitcode". Therefore I tried to symlink the content in the $libdir directory above - but didn´t help. Even copying them in the directory didn´t - same error. What am I missing?
Thank you and best regards,
Goetz
You have a mix of packages installed: Some from the CentOS distribution, some from the PostgreSQL site. That will lead to trouble.
Uninstall the PostgreSQL packages that do not have PGDG in them and make sure to disable them as shown in the link you show. Then install the PGDG packages for PostGIS

Error installing PostGIS for PostgreSQL on Mac

I'm trying to install PostgreSQL with its PostGIS extension on Mac. The installation happens in two parts : 1) PostgreSQL and 2) PostGIS through the stack builder. The first phase goes smoothly, but the second phase returns the following error at the beginning of the installation of PostGIS:
I trying installing it with the latest version of PostgreSQL as well (version 12), and I get the same error. Any idea what is happening here?
I have the same issue when I install PostGIS by Stack Builder on MacOS.
After many times trying to install/uninstall PostGIS. Finally, I installed it successfully by manual installation.
I think this issue caused by your MacOS doesn't have or conflict in the default app for extracting .zip file.
I have fixed it by install manually, like the following:
Download PostGIS by Stack Builder as usual
Open the folder where you have downloaded PostGIS (often it is /Users/yourUserName)
Extract the PostGIS zip file (the file name like this: edb_postgis_...)
Install PostGIS app
Finally, everything is done! You have installed it successfully!

Postgres: PostGIS extension in a separate path

The Linux machine I use has SuSE 12.1 with Postgres 9.4 installed (as root). I was able to compile and install the PostGIS 2.5 extension in a user area. Under this installation, I see, among other things, contrib folder, some sql files and .so files etc.
I can launch Postgres using my personal user. How can I let Postgres know to refer to this directory where all the PostGIS extension related files/objects are available?
When I try creating the extension, I get the following error:
ERROR: could not open extension control file "/usr/share/postgresql94/extension/postgis.control": No such file or directory
Of course, some error is expected as Postgres doesn't know about my PostGIS installation. But the latter does not have such a file, postgis.control.
I am guessing the solution is to ensure Postgres can see the .so files (may be set LD_LIBRARY_PATH?) or create a postgis.control file with all the relevant details etc.
Any assistance including simply pointing to documentation will be appreciated.
I see a few similar questions but no one seems to address my issue of the extension - PostGIS - in a separate directory. They assume root access.
Like every extension, PostGIS has to be installed in the PostgreSQL extension subdirectory (under share).
When PostGIS is configured, it looks for pg_config on the PATH, or you can explicitly specify the --with-pgconfig option to configure.
Once you have built PostGIS, make install will automatically put all files in the proper place.
You are not very specific how you built PostGIS, but you must have strayed from the correct path somewhere. If you share some details, we might be able to figure out what went wrong.
Re-reading your question I get the impression that you installed PostGIS somewhere outside the PostgreSQL software directory because you lack the necessary root privilege. That simply won't work, and there is no workaround.
You'd have to install PostgreSQL somewhere where you have write access.

Installing plpythonu on Windows

I'm trying to install plpython on a postgres server on a Windows machine. When I issue the command CREATE EXTENSION plpython3u; in postgres, I get the following error, which I'm trying to find the source of.
ERROR: could not load library "C:/Program Files/PostgreSQL/9.3/lib/plpython3.dll": The specified module could not be found.
This file exists, which I presume means that Windows can't find one of the files it depends on. When I open the plpython3.dll with Dependency Walker, it tells me it can't locate the GPSVC.dll.
Is it likely that this missing dll would cause the CREATE EXTENSION command to fail? I found a .dll with the same name in C:\Windows\System32 and copied it over to C:\Windows\SysWOW64, but this did not resolve the probelm, and although dependency walker now finds the .dll, it raises several other errors about having modules with different CPU types.
I know this is an old question, but thought I would post to save someone the headaches I went through trying to fix this...
I had the same error trying to add pl python using Postgres 9.5. Dependency walker showed that plpython3.dll was looking for python33.dll, so I installed python 3.3 and added the install directory into my path and that seems to have fixed the problem.
Use specific python version on Windows. I could get it running with python 3.2.x with postgres 9.3