1

When I issue "CREATE EXTENSION postgis", I'm getting :

curs.execute('CREATE EXTENSION postgis') psycopg2.InternalError: could not load library "/usr/lib/postgresql/9.5/lib/postgis-2.3.so": /usr/lib/liblwgeom-2.3.so.0: undefined symbol: GEOSClipByRect**

I use psql (PostgreSQL) 9.6.1. Does anybody know how can I fix it?


I use following comments for installing postgis.

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt xenial-pgdg main" >> /etc/apt/sources.list'

wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -

sudo apt-get update

sudo apt-get install postgresql-9.5-postgis-2.2 pgadmin3 postgresql-contrib-9.5

closed as off-topic by Vince, user30184, Evil Genius, PolyGeo Feb 7 '17 at 6:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions relating to general IT or with no clear GIS component, are off-topic here but can be researched/asked at Stack Overflow (software development), Super User (computing hardware and software), Database Administrators (relational databases) and other SE sites" – Vince, user30184, Evil Genius, PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Questions about using PostGIS with GIS software are on topic here in GIS SE, but install issues are better researched in the DBA exchange. As a relatively new user, pease take the Tour. Please format code in a code block and quotes in quote blocks. – Vince Feb 6 '17 at 11:55
  • do you have installed both postgres 9.5 and 9.6 on your OS? because it seems like python path conflict – Shahzad Bacha Feb 6 '17 at 12:45
  • 1
    Please give more details about your installation process. – John Powell Feb 6 '17 at 14:20
1

This error happens if you compiled PostGIS with a newer version of GEOS than what you have in your install path.

If you installed your PostGIS from a package, you probably just need to do an apt-get update, apt-get upgrade

The psycopg2 error I'm assuming is because you are installing via python and not at all the issue.

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