Im having problem installing postgis to an existing database. but getting error like this:
ERROR: could not load library "/usr/local/pgsql/lib/postgis-2.0.so": libgeos_c.so.1: cannot open shared object file: No such file or directory
the postgis-2.0.so is in /usr/local/pgsql/lib/postgis-2.0.so no problem. the libgeos_c.so.1 is installed in /usr/local/lib.
So, what is the problem here?
Any help would be appreciated.
Thanks.
BTW, I installed all these followed by this tutorial:
http://www.codingsteps.com/installing-and-configuring-postgresql-in-amazon-linux-ami/
update
$ ldd /usr/local/lib/libgeos_c.so.1
linux-vdso.so.1 => (0x00007fff6f55b000)
libgeos-3.3.7.so => /usr/local/lib/libgeos-3.3.7.so (0x00007f53700d9000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f536fdd0000)
libm.so.6 => /lib64/libm.so.6 (0x00007f536fb4c000)
libc.so.6 => /lib64/libc.so.6 (0x00007f536f7c0000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f536f5ab000)
/lib64/ld-linux-x86-64.so.2 (0x00007f537068d000)
It's way easier to just use a sensible Linux distro like Ubuntu, Debian, Fedora, RHEL, etc. You can then just use http://apt.postgresql.org/ or http://yum.postgresql.org/ as appropriate and get all this stuff pre-built and easy to install. Amazon's PostgreSQL packaging is unsafe bordering on incompetent and should be avoided.
I suspect the immediate problem is /usr/local/lib not being on LD_LIBRARY_PATH and/or in /etc/ld.so.conf, so when PostgreSQL dlopen(...)'s postgis-2.0.so it tries to resolve libgeos_c.so.1 and fails to find it.
Another possibility would be if /usr/local/lib/libgeos_c.so.1 is a symbolic link to a file that does not exist.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With