Postgis works fine on my other postgresql databases, but I can't load postgis and postgis_topology extensions on a new database. I get following error message:
ERROR: could not load library (path to PostgreSQL): unknown error 126
Off course I could work in a different database with postgis loaded, but I don't like the idea that my new databases might not support postgis.
How to solve this problem?
I have PostgreSQL 9.2, PostGIS 2.0.1 and PgAdmin III 1.16.
EDIT:
My system is Windows XP SP 2.
And the statement I used:
CREATE EXTENSION postgis SCHEMA topology VERSION "2.0.1";
I have created schema "topology" manually, but it makes the same error for
-
... on what operating system and version? Also, please don't edit the error message, can you show the original and the statement you ran to create it, as well as a listing of the location the error refers to?Craig Ringer– Craig Ringer2013年05月15日 00:13:44 +00:00Commented May 15, 2013 at 0:13
-
1Use the Enterprisedb stackbuilder installer it creates postgres database and postgis is an option with built in spatial template enterprisedb.com/products-services-training/products/…Mapperz– Mapperz ♦2013年05月15日 02:50:55 +00:00Commented May 15, 2013 at 2:50
1 Answer 1
This looks like more of a database install problem than a GIS issue. For that reason, a quick search on our sister Stackexchange site StackOverflow, turned up this question and series of answers:
Postgres could not load library unknown error 14001
Here is the answer that did the trick: https://stackoverflow.com/a/13513473/1388679
It boils down to an install on a Windows machine that is missing the correct version of Microsoft Visual C++. Since you have not provided that information, this is a bit of a guess, but it seems to match what you are running into.
One other solution also mentioned on that thread would be:
- Completely uninstall Postgresql and all of its dependencies.
- Make sure that all Windows updates are applied correctly.
- Reinstall Postgresql and PostGIS. This would ensure that the correct supporting files are being installed with the database.
-
Since our systems are almost the same, it's likely that this guy's solution will work for me too. +1Pavel V.– Pavel V.2013年05月15日 00:47:56 +00:00Commented May 15, 2013 at 0:47