Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
    
... 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 May 15 '13 at 0:13
1  
Use 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 May 15 '13 at 2:50
add comment

1 Answer

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: http://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:

  1. Completely uninstall Postgresql and all of its dependencies.
  2. Make sure that all Windows updates are applied correctly.
  3. Reinstall Postgresql and PostGIS. This would ensure that the correct supporting files are being installed with the database.
share|improve this answer
    
Since our systems are almost the same, it's likely that this guy's solution will work for me too. +1 –  Pavel May 15 '13 at 0:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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