Opened 9 years ago
Closed 9 years ago
#3381 closed defect (worksforme)
Can't load postgis - 'unknown error 193'
Reported by: | kylotan | Owned by: | robe |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.2.1 |
Component: | build | Version: | 2.2.x |
Keywords: | windows | Cc: |
Description
I get this dialog in PGAdmin (and the text at the end if I just try the SQL statement 'create extension postgis')
pgAdmin III
An error has occurred:
ERROR: could not load library "C:/Program Files/PostgreSQL/9.4/lib/postgis-2.2.dll": unknown error 193
I've confirmed that I'm running 64 bit versions of everything, and that there's no other instance of postgis-2.2.dll on my hard disk.
OS: Win 8.1. 64bit
Postgres: PostgreSQL 9.4.5, compiled by Visual C++ build 1800, 64-bit
postgis: 2.2.0 64bit, downloaded from http://download.osgeo.org/postgis/windows/pg94/archive/ or installed via StackBuilder from EnterpriseDB, makes no difference
Attachments (1)
Change History (6)
comment:1 by , 9 years ago
Component: | postgis → build/upgrade/install |
---|---|
Keywords: | windows added |
Owner: | changed from | to
comment:3 by , 9 years ago
Owner: | changed from | to
---|
comment:4 by , 9 years ago
There had been some previous upgrading of components going on which may have included the 32 bit version so this is almost certainly what happened to me. I performed the delete/rename trick with libxml and now it appears to work, thanks.
comment:5 by , 9 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Great so not an issue with the installer. What a relief. Though I still would like to prevent such a thing from happening at least not to show both the 32-bit and 64-bit if you picked the PostgreSQL 64-bit port install. I asked EDB folks about this a while back they said technically since a 32-bit software can be installed on a 64-bit OS, the way the application builder works, it has to show both as options. So people who are only on 32-bit only ever see the 32-bit option (but sadly 64-bit people see both regardless which version of PostgreSQL they picked).
For future I may minimize this by just always overwriting the libxml2-2.dll for 64-bit install. As I recall, I think it might only be for the 32-bit where they sometimes package libxml2-2.dll and sometimes they don't. The main reason I don't overwrite is if they do have a liblxml2-2.dll, means they are linking with that name and their libxml version has more stuff compiled in than what I bother with including with PostGIS, so PostGIS will work with their version, but their version may not work with what I ship.
Just to confirm - you were using this one right?
http://download.osgeo.org/postgis/windows/pg94/postgis-bundle-pg94x64-setup-2.2.0-1.exe
When you install via Stackbuilder — it shows two, if you chose the 32-bit one time then it shows that error. If one time you installed 32-bit via stackbuilder by accident, it might show 32-bit also installed even if you just installed in the 64-bit folder
I just checked one of the installs I did via stackbuilder and it shows this but that's a windows 2012 R2 (which should be pretty similar to windows 8 and 8.1)
So I think the binaries are okay.
Now if you did make a mistake once and copied the 32-bit libraries or installed the 32-bit install and reinstall the 64-bit postgis. Your install might still be broken.
This is because the libxml2-2.dll doesn't get overwritten (that's because sometimes EDB distributes that and sometimes they don't so the installer installs one if it doesn't see one present, and if you just copied from the zip, you would get that one) and it wouldn't get overwritten by a new install.
So if that is the issue, what you could do is delete the libxml2-2.dll and copy the one called libxml2.dll (and give the new copy name libxml2-2.dll )