0

I just try to install the PostGIS 2.0.3 on PostgreSQL x64 9.1 on the Windows Server 2008 R2. I got the error message "Error openning file for writing" C:\Program Files\PostgreSQL\9.1\bin\libiconv-2.dll. Should I click "Abort", "Retry" or "Ignore"? Thanks. :)

3 Answers 3

2

You cannot overwrite libiconv-2.dll because it has been locked by postgres.exe. So, first you must stop the postgresql-9.1 service from your control panel/administrative tools/services. Second, restart the PostgreSQL service, rename libiconv-2.dll to libiconv-2.old and then proceed the PostGIS installation.

1
  • Forgot about this too, it's probably it.
    – SaultDon
    Commented Jan 8, 2014 at 14:20
0

Set your install and data directories to a path outside of c:/Program Files. My install folders are c:/PostgreSQL

4
  • Thanks. It works! The postgis is completely installed, but I skip the error message "Error openning file for writing" C:\Program Files\PostgreSQL\9.1\bin\libiconv-2.dll! Can I do this? Commented Jan 9, 2014 at 4:30
  • I do not totally understand the comment. Are you still getting the error message C:\Program Files\PostgreSQL\9.1\bin\libiconv-2.dll when using a installation and data directory like c:\PostgreSQL\... ?
    – Ralph Dell
    Commented Jan 9, 2014 at 13:28
  • The PostGIS is installed. Yes, the message "Error openning file for writing" C:\Program Files\PostgreSQL\9.1\bin\libiconv-2.dll" is still there, I just click the "ingore" button. Commented Jan 10, 2014 at 8:41
  • If you specify your install folder as c:/PostgreSQL/.. then you should not have any components installed in c:/Program Files. I am looking at my windows 2008 R2 server and there is not a PostgreSQL folder under Program Files. I am guessing that it is an artifact from your first attempts. I would uninstall post, delete that folder under Program Files, and reinstall Post and set the install and data directories to be under c:/PostgreSQL
    – Ralph Dell
    Commented Jan 10, 2014 at 13:23
0

I had this problem due to user permission errors on Windows Server 2008 R2.

It might not like that your Domain user is also an admin user. It might expect a local admin user instead.

I remember creating a local (not a DOMAIN user) user with admin rights or used an existing account with admin rights then logged in with that local admin user and installed that way.

Then logged out and back in with regular user/domain account.

4
  • I used local admin user to install! It doesn't work! Commented Jan 8, 2014 at 3:32
  • @wingsuetcheung did you launch the installer as an administrator from the right-click menu after logging in as a local admin user?
    – SaultDon
    Commented Jan 8, 2014 at 4:08
  • Yes I did tried. :( Commented Jan 8, 2014 at 4:13
  • @wingsuetcheung Sorry, I can't think of anything else. It would be really helpful if you could do some troubleshooting from your end and maybe update your question with what you did and found.
    – SaultDon
    Commented Jan 8, 2014 at 4:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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