Installing plpythonu on Windows - postgresql

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

Related

postgres-decoderbufs-master -- centos7

I am trying to CDC by debezium protobuf of postgres 9.6 and as per instruction i have downloaded source from git and trying to make then it have some problem and try to find out the solution on satckoverflow and other sites also then for ubuntu os many solution are available but for centosh 7 no solution found
The following error is coming when i fired make command
/usr/pgsql-9.6/lib/pgxs/src/makefiles/pgxs.mk:62: /usr/pgsql-9.6/lib/pgxs/src/makefiles/../../src/Makefile.global: No such file or directory
Package libprotobuf-c was not found in the pkg-config search path.
Perhaps you should add the directory containing `libprotobuf-c.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libprotobuf-c' found
/usr/pgsql-9.6/lib/pgxs/src/makefiles/pgxs.mk:105: /src/Makefile.shlib: No such file or directory
make: *** No rule to make target `/src/Makefile.shlib'. Stop.
if any help it will very useful for my project.
You need a protobuf-c-devel package installed. Also there is a problem with version. Check if your system has the correct version otherwise you'd need to install it from 3rd part RPM repository - https://groups.google.com/forum/?fromgroups=#!msg/debezium/v0s3tacOXeA/gVrdQAR2AgAJ;context-place=forum/debezium

Cannot install Qt postgreSQL driver

I'm posting here with the hopes that someone will be kind enough to help me. Just to clarify, I'm sort of a newb, so I'd be really grateful if you give more details to your explanations.
I'm on Windows 10 64 bit, QT 5.9.1, PostgreSQL is 9.6.3 version.
I'm working on a project, where I need to get a postgresql database running and connect it to the code I'm doing right now. Unfortunately, when I try to install the driver, I run into all kinds of problems. I've been reading on threads on sites, but they are outdated and some folders do not match, which my first problem arises. For some reason I cannot get qmake to work, even though I edit the path in the variables.
I tried running the commands from here.
cd %QTDIR%\qtbase\src\plugins\sqldrivers\ps
ql
qmake "INCLUDEPATH+=C:/psql/include" "LIBS+=C:/psql/lib/ms/libpq.lib" psql.pro
nmake
Basically my folders don't aren't 100% as the guide, also I don't have a libpq.lib file
On my final attempt I tried the following:
qmake "INCLUDEPATH+=C:/PostgreSQL/pg96/include" "LIBS+=C:/PostgreSQL/pg96/lib/libpq.lib"
Project ERROR: Cannot run compiler 'cl'. Maybe you forgot to setup the environment?
You'll need to have PostgreSQL installed so you have libpq.lib and libpq.dll. You cannot compile the Qt PostgreSQL driver without these. You'll also need to find the include directory for your PostgreSQL install, the one that contains libpq-fe.h.
Then determine the paths to those. Set the PATH to include the directory with libpq.dll. Set LIBS to include the directory with libpq.lib. And set the INCLUDEPATH to include the directory with libpq-fe.h.
You'll probably need to do this within a "Visual Studio Command Prompt" or run vcvarsall.bat fist, too, so qmake can find Visual Studio.

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

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?

Stack cannot find libpq when given directory

I am trying to set up a stack project that uses the postgresql-simple package among others. When trying to stack build, all of the dependencies for postgresql-simple installed without issue, but stack is having trouble installing postgresql-simple itself. I get the following error:
C:project> stack build --extra-include-dirs="C:\PostgreSQL\8.4\include" --extra-lib-dirs="C:\PostgreSQL\8.4\lib"
... omitted ...
*****************
--extra-include-dirs=C:\PostgreSQL\8.4\include
*****************
--extra-include-dirs=C:\Users\User\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw32\include
--extra-include-dirs=C:\Users\User\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include
*****************
--extra-lib-dirs=C:\PostgreSQL\8.4\lib
*****************************
--extra-lib-dirs=C:\Users\User\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw32\lib
--extra-lib-dirs=C:\Users\User\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib
Process exited with code: ExitFailure 1
Logs have been written to: C:\Users\User\Desktop\draftkings\NFAccuracy\.stack-work\logs\postgresql-libpq-0.9.1.1.log
Configuring postgresql-libpq-0.9.1.1...
Setup.hs: Missing dependency on a foreign library:
* Missing C library: pq
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
I've tried also specifying the paths in my stack.yaml file, same error.
I've tried manually copying the library and include files from my postgres installation to the mentioned ...\mingw64\lib and ...\mingw64\include folders. Same error.
I have the files libpq.dll and libpq.lib in my C:\PostgreSQL\8.4\lib folder.
I feel like I'm missing something obvious but I can't get this to work and I'm not sure what I'm doing wrong. Any help is appreciated.
Update
I forgot to mention two important details.
First, I have added C:\PostgreSQL\8.4\bin to my PATH. As far as I know, this works as expected, because I got past an error about pg_config missing, to the error I currently have.
Second, I also tried adding the lib and include directories to my PATH, but this did not change the error.
I should also mention my Postgres installation works fine on its own.
I know that the Snowdrift project uses PostgreSQL and builds with Stack on Windows. They have a build guide on their site. It looks like one difference is that they mention:
Add the PostgreSQL bin directory to the path C:\Program Files (x86)\PostgreSQL\9.4\bin
Can you try adding that to the PATH and see if that fixes it?
There was some kind of version mismatch.
Installing Postgres 9.4 instead of 8.4 allowed the postgresql-simple package to be built in the manner I was attempting.
My stack project, without intervention by me, defaulted to using resolver: 'lts-3.7' This provided version 0.4.10.0 of the postgresql-simple package to my project. I wish I had a more detailed answer, but all I can tell is that this version of postgresql-simple (which is fairly recent) works fine with PostgreSQL 9.4 (which is also recent).
And thankfully, using haskell and postgresql-simple built against Postgres 9.4 libraries is having no issue communicating with my 'remote' (virtualbox) database which is Postgres 8.4.
I'm tempted to flag my question as not constructive unless others find this useful info.

PHP5 - pgsql Module not loaded

I am trying to get work PostgresSQL with PHP, but i stuck on that apache error:
Call to undefined function pg_connect().
When i run phpinfo() i cannot see that my module is loaded, but i do not know why. The pgsql.ini files were loaded. And when i open them, i can see, that the extension is enabled extension=pgsql.so. Under /usr/lib64/php5/extensions there is the .so file. Even the permission are same like the other modules.
Any idea what am I doing wrong?
It would help if you could describe what operating system you are using. I'm assume Linux, but which distribution? One package that is often forgotten when installing postgresql and php is php5-pgsql. This is the connection between the two. For some reason I cannot explain, it is best if all three are installed together. So I suggest uninstalling postgresql and php and then installing postgresql, php5 and php5-pgsql. I hope this works for you!
I found it out. Some libraries where not found.
1.) First of all run php -version
2.) If there is an error where it described that some libraries are missing, you can solve it like me
3.) Search for the files on your system find / -name {LIBRARY NAME}
3a.) If you found them, just create a symlink to /usr/lib64
3b.) If not, find a way to get them and 3 3a