[postgis-users] PostGIS 2.0 instalation problem

477 views
Skip to first unread message

Piotr Pachół

unread,
Mar 16, 2012, 7:45:06 AM3/16/12
to postgi...@postgis.refractions.net
Hello,
I try to install PostGIS 2.0 on Windows XP using script file makepostgisdb_using_extensions.bat
During executing of line: "%PGBIN%\psql"  -d "%THEDB%" -c "CREATE EXTENSION postgis;"
I received error:  can't load library "C:/Program Files/PostgreSQL/9.1/lib/postgis-2.0.dll": unknown error 126

I checked above path - file postgis-2.0.dll is that catalog.
What should I do?

Piotr

Bborie Park

unread,
Mar 16, 2012, 1:13:09 PM3/16/12
to PostGIS Users Discussion

Piotr,

The problem lies with the first xcopy in the batch file. Simplest thing
to do is to turn off the PostgreSQL server and copy the contents of
bin/*.* from the PostGIS zip archive to C:/Program
Files/PostgreSQL/9.1/bin. Turn the PostgreSQL server back on and then
run the psql scripts.

-bborie

--
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkp...@ucdavis.edu
_______________________________________________
postgis-users mailing list
postgi...@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Piotr Pachół

unread,
Mar 18, 2012, 6:13:41 PM3/18/12
to PostGIS Users Discussion
W dniu 2012-03-16 18:13, Bborie Park pisze:

> On 03/16/2012 04:45 AM, Piotr Pachół wrote:
>> Hello,
>> I try to install PostGIS 2.0 on Windows XP using script file
>> makepostgisdb_using_extensions.bat
>> During executing of line: "%PGBIN%\psql" -d "%THEDB%" -c "CREATE
>> EXTENSION
>> postgis;"
>> I received error: can't load library "C:/Program
>> Files/PostgreSQL/9.1/lib/postgis-2.0.dll": unknown error 126
>>
>> I checked above path - file postgis-2.0.dll is that catalog.
>> What should I do?
>>
> .

> Piotr,
>
> The problem lies with the first xcopy in the batch file. Simplest
> thing to do is to turn off the PostgreSQL server and copy the contents
> of bin/*.* from the PostGIS zip archive to C:/Program
> Files/PostgreSQL/9.1/bin. Turn the PostgreSQL server back on and then
> run the psql scripts.
>
> -bborie
>
I followed steps you had mentioned but I still received the same error 126.
Is it possible to do instalation another way on Windows ?

Piotr

Hemin Tofiq

unread,
Mar 18, 2012, 6:44:05 PM3/18/12
to postgi...@postgis.refractions.net
Hi,
Try to install it to another directory, I have seen that the space in
"Program Files" gives problems.

Regards,
Hemin

--
View this message in context: http://postgis.17.n6.nabble.com/PostGIS-2-0-instalation-problem-tp4624902p4631437.html
Sent from the PostGIS - User mailing list archive at Nabble.com.

Piotr Pachół

unread,
Mar 20, 2012, 5:00:28 PM3/20/12
to PostGIS Users Discussion
Hello,
I installed postgres and postgis directly in c:/postgres directory
Unfortunately the same unknown error 126 occured

Piotr

W dniu 2012-03-18 23:44, Hemin Tofiq pisze:

wobo

unread,
May 1, 2012, 6:55:51 PM5/1/12
to postgi...@postgis.refractions.net
Hi all,

I'm a newbie student, just finished reading 'Postgis in action' and now
trying to get PostGIS2.0 up and running for the first time. Now I'm
suffering a similar problem in setup like the one mentioned earlier in this
thread.

Using Windows XP SP3 I was able to install the latest PostgreSQl 9.1.3
stable version. Trying to install PostGIS 2.0 with the one-click installer
fails during makepostgisdb.bat (CREATE EXTENSION postgis;):
ERROR: could not load library "C:/Program
Files/PostgreSQL/9.1/lib/postgis-2.0.dll": unknown error 998

I tried several approaches (restarting, copying by hand, renaming, etc) as
mentioned in similar other threads but nothing succeeded so far. All the
important files seem to be in the right place. It seemed some needed
dependencies first were missing (LIBGEOS, LIBXML2-2, POSTGRES, LIBPROJ-0) so
I added the PGBIN to the environment variable.

After restart Dependency Walker now finds these mentioned files but there
are still dependency errors on IESHIMS.dll and WER.dll. I read that these
are unnecessary/unused in Windows Xp. Does this imply that it is impossible
to install PostGIS2.0 on Windows XP? Before there were a lot of errors but
now the pg_log file only throws the "could not load library postgis-2.0"
error line like:

2012-05-02 00:25:05 CEST LOG: database system was shut down at 2012-05-01
23:26:44 CEST
2012-05-02 00:25:06 CEST LOG: database system is ready to accept
connections
2012-05-02 00:25:06 CEST LOG: autovacuum launcher started
2012-05-02 00:25:30 CEST ERROR: could not load library "C:/Program
Files/PostgreSQL/9.1/lib/postgis-2.0.dll": unknown error 998
2012-05-02 00:25:30 CEST STATEMENT: CREATE EXTENSION postgis;
2012-05-02 00:25:30 CEST ERROR: required extension "postgis" is not
installed
2012-05-02 00:25:30 CEST STATEMENT: CREATE EXTENSION postgis_topology;

I have no clue how to proceed from here... Any suggestions?

Thanks in advance,
Wouter

--
View this message in context: http://postgis.17.n6.nabble.com/PostGIS-2-0-instalation-problem-tp4624902p4944746.html

Paragon Corporation

unread,
May 2, 2012, 4:16:36 AM5/2/12
to PostGIS Users Discussion
Wouter,

It should work fine with XP. I tested earlier on a windows xp box. I think
we had issues with earlier installers.

That said, I haven't tried installing the one from Stack builder on my
windows xp box. I'll give that a try tomorrow to verify that works fine.

Where did you get the installer? -- from EDB Application Stack builder or
are you just using the installer from PostGIS website.

Regarding the libgeos, etc. Those should all be in the bin folder of
PostgreSQL and PostgreSQL when its in run mode doesn't have problems finding
it so dependency walker is a bit misleading since it by default tries to
find the files in the same folder.

The issue a lot of people had was that we forgot to package the libxml2-2
thinking that the 32-bit already had it. That we fixed in the installer
packaging though.

The other issue you want to make sure of is that you are using the 32-bit
installer. We have 2 now (32-bit and 64-bit). If you use the 64-bit
installer, it will fail. I forgot which error it gives, but usually
installing the 32-bit over it fixes the issue.

Hope that helps,
Regina
http://www.postgis.us

wobo

unread,
May 2, 2012, 6:48:44 PM5/2/12
to postgi...@postgis.refractions.net
Thanks for the quick response.

First I succesfully installed PostgreSQl 9.1.3 using the win x86-32
installer from
http://www.enterprisedb.com/products-services-training/pgdownload#windows
http://www.enterprisedb.com/products-services-training/pgdownload#windows .
I was able to create extensions like adminpack so I guess postgresql looks
fine.

Then I tried to install PostGIS 2.0 using the Application Stack Builder that
came along the install. But it failed and an error appeared. The PostGIS
installer (postgis-pg91-setup-2.0.0-3.exe) gave the same error.

http://postgis.17.n6.nabble.com/file/n4947700/pg.jpg

Afterwards I downloaded the postgis-pg91-binaries-2.0.0w32-2 (zip) file,
copied the content by hand to the right directories (~ xcopy lines in
makepostgisdb.bat). libxml2-2, libGEOS, etc are in the PGBIN folder. Indeed
I was first mistakenly using the 64-bit installer.. but using the 32-bit
installer afterwards didn't solve the problem.


Since you mention it should work fine with Windows XP I will test it again
tomorrow. First I'll uninstall postgresql, remove the postgres user, remove
the data folder and delete the registry (regedit) for postgresql. Anything
else I forgot to start a clean install?<br>

Tomorrow I'll keep you posted about the second install attempt.

Wouter

--
View this message in context: http://postgis.17.n6.nabble.com/PostGIS-2-0-instalation-problem-tp4624902p4947700.html

Paragon Corporation

unread,
May 2, 2012, 11:32:06 PM5/2/12
to PostGIS Users Discussion
Yap definitely works on windows xp. I just tried uninstalling my 9.1.3 on
windows xp , reinstalling and then using application stack builder to
install PostGIS 2.0.0 and it worked fine.

Regarding dependency walker -- if you still have problems -- there is a
setting in dependency walker that lets you add a search directory. You'll
want ot add the C:\program files\postgresql\9.1\bin folder for it to
correctly resolve the dependencies.

The only dependency I can think of we have aside from what we package and
what EDB packages is the
MSVCRT.dll

I've never seen a windows computer without that file though so haven't
bothered distributing it and it's usually located in system32, but htere
could be an incompatbility there which dependency walker might not pick up.





> -----Original Message-----
> From: postgis-us...@postgis.refractions.net
> [mailto:postgis-us...@postgis.refractions.net] On
> Behalf Of wobo
> Sent: Wednesday, May 02, 2012 6:49 PM
> To: postgi...@postgis.refractions.net
> Subject: Re: [postgis-users] PostGIS 2.0 instalation problem
>

wobo

unread,
May 5, 2012, 6:05:05 PM5/5/12
to postgi...@postgis.refractions.net
I re-installed postgreSQL (which works fine), then tried to install PostGIS
2.0 using the Stack Builder but yet again it throws the could not load
library error. I'm also confident that all the required files are in the
correct directories.

In another thread I read about people having to delete old geos library
files in order to get PostGIS up and running. Since I installed several open
source GIS packages in the past I was wondering if one of these might be
causing the problem. Is there a way to check the GDAL, GEOS and PROJ version
being used? libgeos, libgdal and libproj are all in the PGBIN but maybe some
old versions are interfering, and if so then which ones..? Is there an easy
way to check this?

I also read people got rid of the error running ldconfig but I guess that's
a Linux command, is there a way to do this in Windows?

Meanwhile, the quest continues.

--
View this message in context: http://postgis.17.n6.nabble.com/PostGIS-2-0-instalation-problem-tp4624902p4955146.html

wobo

unread,
May 18, 2012, 8:50:08 PM5/18/12
to postgi...@postgis.refractions.net
So, I've been trying to install PostGIS 2.0 over and over again on several
different Windows XP computers, but didn't succeed in getting it up and
running. So I ended up borrowing my brother's Windows 7 pc, using the exact
same download (postgreSQL + postgis using stackbuilder) which took me about
5 minutes to succesfully install the whole thing.

I have no clue why it doesn't work on my XP. More exactly, why it can't find
the correctly located postgis-2.0.dll-file. But at least I'll be able to
test and recap the 'PostGIS in Action' on Windows 7 from now on.

Many thanks for suggesting and helping anyway.

--
View this message in context: http://postgis.17.n6.nabble.com/PostGIS-2-0-instalation-problem-tp4624902p4993596.html

Paragon Corporation

unread,
Dec 18, 2012, 6:48:27 PM12/18/12
to PostGIS Users Discussion
Willy,
 
when you say compressed postgis file -- you mean the one on this page?
 
 
I unfortunately don't have a windows xp machine readily handy to test with.  I haven't tried upgrading my test to 9.1.7 to rule that out as an issue so I'll give that a try.
This issue is usually caused by libxml2-2.dll incompatibilities.  Though I gather you are using the one packaged with PostGIS since it looks like the postgres one isu using libxml2.dll
 
Have you been running PostGIS 2 or 1.5 on your windows xp successfully in past
 
Thanks,
Regina
 


From: Willy-Bas Loos [mailto:will...@gmail.com]
Sent: Tuesday, December 18, 2012 11:30 AM
To: PostGIS Users Discussion; Paragon Corporation

Subject: Re: [postgis-users] PostGIS 2.0 instalation problem

Hi,

I have the same problem.
I installed postgres on an XP PC, which worked fine. (PostgreSQL 9.1.7, compiled by Visual C++ build 1500, 32-bit)
Then I used the StackBuilder to install PostGIS 2.
Upon creating the extension, i get the error "ERROR: could not load library "C:/Program Files/PostgreSQL/9.1/lib/postgis-2.0.dll": unknown error 998"
The same happens when executing the sql "create extension postgis;"

I tried pasting the contents from the bin folder from the compressed postgis installation file into ../9.1/bin/, but to no avail.

I used Depends.exe to diagnose, like Paragon suggested.
I included the dwi-file as an attachment.
Is there anything i can do?

Cheers,

WBL
--
"Quality comes from focus and clarity of purpose" -- Mark Shuttleworth

wobo

unread,
Dec 18, 2012, 7:55:43 PM12/18/12
to postgi...@postgis.refractions.net
Regina,

I guess this e-mail was intended for somebody else (Willy).
I still haven't been able to install PostGIS 2.0 on my Windows XP, but am using it on Windows 7 succesfully.

Yours sincerely,
Wouter 


Date: Tue, 18 Dec 2012 15:48:57 -0800
From: [hidden email]
To: [hidden email]
Subject: Re: PostGIS 2.0 instalation problem


Willy,
 
when you say compressed postgis file -- you mean the one on this page?
 
 
I unfortunately don't have a windows xp machine readily handy to test with.  I haven't tried upgrading my test to 9.1.7 to rule that out as an issue so I'll give that a try.
This issue is usually caused by libxml2-2.dll incompatibilities.  Though I gather you are using the one packaged with PostGIS since it looks like the postgres one isu using libxml2.dll
 
Have you been running PostGIS 2 or 1.5 on your windows xp successfully in past
 
Thanks,
Regina
 


From: Willy-Bas Loos [mailto:[hidden email]]
Sent: Tuesday, December 18, 2012 11:30 AM
To: PostGIS Users Discussion; Paragon Corporation
Subject: Re: [postgis-users] PostGIS 2.0 instalation problem
Hi,

I have the same problem.
I installed postgres on an XP PC, which worked fine. (PostgreSQL 9.1.7, compiled by Visual C++ build 1500, 32-bit)
Then I used the StackBuilder to install PostGIS 2.
Upon creating the extension, i get the error "ERROR: could not load library "C:/Program Files/PostgreSQL/9.1/lib/postgis-2.0.dll": unknown error 998"
The same happens when executing the sql "create extension postgis;"

I tried pasting the contents from the bin folder from the compressed postgis installation file into ../9.1/bin/, but to no avail.

I used Depends.exe to diagnose, like Paragon suggested.
I included the dwi-file as an attachment.
Is there anything i can do?

Cheers,

WBL
On Sat, May 19, 2012 at 2:50 AM, wobo <[hidden email]> wrote:
So, I've been trying to install PostGIS 2.0 over and over again on several
different Windows XP computers, but didn't succeed in getting it up and
running. So I ended up borrowing my brother's Windows 7 pc, using the exact
same download (postgreSQL + postgis using stackbuilder) which took me about
5 minutes to succesfully install the whole thing.

I have no clue why it doesn't work on my XP. More exactly, why it can't find
the correctly located postgis-2.0.dll-file. But at least I'll be able to
test and recap the 'PostGIS in Action' on Windows 7 from now on.

Many thanks for suggesting and helping anyway.

--
View this message in context: http://postgis.17.n6.nabble.com/PostGIS-2-0-instalation-problem-tp4624902p4993596.html
Sent from the PostGIS - User mailing list archive at Nabble.com.
_______________________________________________
postgis-users mailing list



--
"Quality comes from focus and clarity of purpose" -- Mark Shuttleworth


_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users



If you reply to this email, your message will be added to the discussion below:
http://postgis.17.n6.nabble.com/PostGIS-2-0-instalation-problem-tp4624902p5002094.html
To unsubscribe from PostGIS 2.0 instalation problem, click here.
NAML


View this message in context: RE: PostGIS 2.0 instalation problem

Paragon Corporation

unread,
Dec 19, 2012, 10:33:42 AM12/19/12
to PostGIS Users Discussion
Well I tried it on a windows xp 32-bit.  It was running 9.1.4 2.0.0.  So first upgraded to 2.0.1 via stackbuilder (it did give me a failure) which was odd. Then upgraded to 9.1.7 and my 2.0.1 for some reason was fine then.
 
 
 
To rule out issue with a clean 9.1.7 and postgis overwriting binaries I uninstalled 9.1.7 and postgis (whiche required reboot) , deleted the whole PostgreSQL  folder, reinstalled 9.1.7, then 2.0.1 via stackbuilder.  All seemed to go fine.
 
It's possible I have something else installed on this machine it's using, but it does rule out XP alone being an issue.
 
1) Did you try rebooting your pc afterward?
2) Which service pack are you running on windows xp.
3) What virus software -- I've seen for example (I think it was Norton) delete some postgresql files on one machine thus preventing postgresql from starting.
 
Hope that helps,
Regina 
 


From: Willy-Bas Loos [mailto:will...@gmail.com]
Sent: Tuesday, December 18, 2012 11:30 AM
To: PostGIS Users Discussion; Paragon Corporation
Subject: Re: [postgis-users] PostGIS 2.0 instalation problem
Hi,

I have the same problem.
I installed postgres on an XP PC, which worked fine. (PostgreSQL 9.1.7, compiled by Visual C++ build 1500, 32-bit)
Then I used the StackBuilder to install PostGIS 2.
Upon creating the extension, i get the error "ERROR: could not load library "C:/Program Files/PostgreSQL/9.1/lib/postgis-2.0.dll": unknown error 998"
The same happens when executing the sql "create extension postgis;"

I tried pasting the contents from the bin folder from the compressed postgis installation file into ../9.1/bin/, but to no avail.

I used Depends.exe to diagnose, like Paragon suggested.
I included the dwi-file as an attachment.
Is there anything i can do?

Cheers,

WBL

Willy-Bas Loos

unread,
Dec 20, 2012, 5:40:28 AM12/20/12
to PostGIS Users Discussion, PostGIS Users Discussion
Hi Regina, thanks for answering

The compressed file that i was talking about was the postgis installation executable (i just asked 7zip to unzip it and it worked)

I tried installing a newer version too (9.2 + postgis 2.0.1), but that doesn't help.
I also tried the binaries that you suggested, but that doesn't help either.
Postgis 1.4 is the latest version that was installed successfully on this PC. It was deinstalled before i installed this newer version.

1) i rebooted but that doesn't help
2) that's service Pack 3
3) The virus software is called "Symantec Endpoint Protection"

Cheers,

Willy-Bas



_______________________________________________
postgis-users mailing list
postgi...@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Nahum Castro

unread,
Dec 20, 2012, 9:18:47 AM12/20/12
to PostGIS Users Discussion, postgi...@postgis.refractions.net
Same error
Unknown 998

Windows 7 sp1 64
Postgresql: "PostgreSQL 9.2.2, compiled by Visual C++ build 1600, 64-bit"
Postgis 2.0.1 for Postgresql x64
 
--
Nahum Castro
Leon, Guanajuato, Mexico
http://www.leon-linux.com
e-mail: pedro1_72 [en] yahoo [punto] com

De: wobo <mcw...@hotmail.com>
Para: postgi...@postgis.refractions.net
Enviado: Martes, 18 de diciembre, 2012 18:55:43
Asunto: Re: [postgis-users] PostGIS 2.0 instalation problem

Paragon Corporation

unread,
Dec 21, 2012, 11:47:44 AM12/21/12
to PostGIS Users Discussion
Well looks like 998 means some sort of memory allocation error or corrupted file.
 
Last time I saw a problem like this was when the 2 GEOS files were out of synch.
 
The PostGIS windows packages come with two GEOS files:
 
libgeos_c-1.dll
libgeos-3-*.dll
 
where for 2.0.1 the 3-* I think was 3-3-5 .libgeos_c-1.dll depends on libgeos-3-*.
 
If the file libgeos_c-1.dll  is in use during install, it should throw a warning of some sort and error out, but if per chance it doesn't that's a packaging mistake on my part.
 
If those two are out of synch postgis will fail to load and I think gives a 998 or something similar.
 
To fix, shut down your postgresql service, restart and then install (make sure no one is accessing your postgresql (particularly trying to run postgis queries). 
Or shut down copy the files from one of the zip I mentioned and then start up the service again.
 
 
 
 


From: postgis-us...@lists.osgeo.org [mailto:postgis-us...@lists.osgeo.org] On Behalf Of Nahum Castro
Sent: Thursday, December 20, 2012 9:19 AM
To: PostGIS Users Discussion; postgi...@postgis.refractions.net
Reply all
Reply to author
Forward
0 new messages