7

I've installed PostgreSQL with Postgis (tried both version 9.4 and 9.5 ) on a remote desktop running Windows 7 64bit.

However, when I executed this SQL command: "CREATE EXTENSION postgis" (on PgAdmin run as administrator), this message came up:

ERROR: could not load library "C:/PostgreSQL9_5/lib/rtpostgis-2.2.dll": The specified procedure could not be found.

********** Error **********

ERROR: could not load library "C:/PostgreSQL9_5/lib/rtpostgis-2.2.dll": The specified procedure could not be found. SQL state: XX000

I can confirm that "rtpostgis-2.2.dll" was there.

Please tell me how to fix this. It's so frustrating to uninstall and then reinstall every time but the problem still persisted.

P/s: On my Home PC running Windows 10 64bit, PostgreSQL is running like a charm. Postgis and Pgrouting extension can be created easily.

  • Are you able to connect to a psql session on the remote machine. I am wondering if it is a permissions issue. – John Powell Apr 1 '16 at 10:01
  • Did you mean "using psql in command line?". Actually I tried connecting to the database by using command line but it just gave a error message, kind of "psql not recognizable". – Nikolas Apr 1 '16 at 11:36
  • I did mean that, yes. It is likely, as it is a remote machine, that the you don't have the path to the Postgres executables set as an environment variable. Try echo %PATH% in a cmd prompt on remote machine. If that does not contain a path to the Postgres binaries, then either add it, or run CREATE EXTENSION postgis from that location. – John Powell Apr 1 '16 at 12:11
  • I've tried:: 1-Add PATH to Postgres bin folder -> Still no use//// 2-Install PostgreSQL 9.3 and run cmd from bin folder, using psql to "create extension postgis" -> the same error occured. On this remote desktop (a virtual machine run on server), I've once succeeded in install PostgreSQL 9.4, create postgis ext and...., everything was fine, until I upgrade this to version 9.5. – Nikolas Apr 1 '16 at 13:56
  • I am also having same problem. Seems like something wrong with 95 – Sankaranarayanan Apr 1 '16 at 20:25
9

I suspect you are running the latest PostgreSQL Patch released yesterday. I have confirmed an incompatiblity issue with latest release OpenSSL and the libcurl we ship - detailed here - http://www.postgresonline.com/journal/archives/364-PostGIS-2.2-Windows-users-hold-off-on-installing-latest-PostgreSQL-patch-release.html

We have compiled a new version of curl compiled with same version of OpenSSL that ships with PostgreSQL 9.5.2.

http://winnie.postgis.net/download/windows/pg95/buildbot/libcurl7.48withsslx64.zip

Replace your libcurl-4.dll with the one in this zip and it should resolve your problems.

  • I had the same issue (Win7 x64) and I can confirm that the substitution fix the issue! – gmas80 Apr 3 '16 at 1:34
  • I ran into the same problem when installing postgis from the Application Stack Builder and this dll fixed the issue, but I had some difficulty getting it to work. The issue was that I could put the patched file in, but it would get overwritten again with the incompatible version when I tried to do the install. During the install it pauses to ask a few yes/no options, at that point I could paste the patched version in and it would work. Hopefully that helps if anyone else is running into the same issue. – Ben Sutton Apr 8 '16 at 19:53
  • 1
    I just put up PostGIS 2.2.2 on Application Stackbuilder for PostgreSQL 9.5 (x32/x64). These have the fixes, so for future people having this issue, just install the lastst from Stackbuilder. Can also get from postgis.net/windows_downloads The binaries for other versions should work too but haven't packaged installers for others yet. – LR1234567 Apr 10 '16 at 4:56
  • I am having the same issue running postgres 9.3 and postgis 2.2. I replaced the libcurl-4.dll with the one you provided, but I am still getting the same error? And the rtpostgis-2.2.dll is in the location where it says it can't be found. – kflaw Apr 24 '16 at 20:13
  • That's the wrong one for 9.3. I haven't released 9.3 2.2.2 stackbuilder yet - but you can pull the curl from binaries - winnie.postgis.net/download/windows/pg93/buildbot/… which is in folder: winnie.postgis.net/download/windows/pg93/buildbot (if you replacea ll teh files, you'll have PostGIS 2.2.2 – LR1234567 Apr 25 '16 at 21:17

protected by Community Apr 5 '16 at 3:08

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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