Can't create postgis extension

247 views
Skip to first unread message

Francisco Roldan

unread,
Sep 18, 2017, 11:50:38 AM9/18/17
to geodjango

When I try to create a postgis extension the follow error is raised:

CREATE EXTENSION postgis;
ERROR:  could not load library "/usr/lib/postgresql/9.5/lib/postgis-2.3.so": /usr/lib/liblwgeom-2.3.so.0: undefined symbol: GEOSClipByRect

For the installation, I have followed this guide: https://docs.djangoproject.com/en/1.11/ref/contrib/gis/install/geolibs/

Ubuntu: 16.04

Postgres: 9.5.8


Regards

Claude Paroz

unread,
Sep 18, 2017, 11:59:54 AM9/18/17
to geod...@googlegroups.com
Le 18. 09. 17 à 17:27, Francisco Roldan a écrit :
I suspect a problem with certain package versions.
Could you tell us which version you have for liblwgeom and libgeos?

Do you have other GIS-related external package repositories enabled?

Claude
--
www.2xlibre.net

Francisco Roldan

unread,
Sep 18, 2017, 2:10:48 PM9/18/17
to geodjango
 apt-cache show libgeos-dev | grep Version
Version: 3.5.0-1ubuntu2

apt-cache show liblwgeom-dev | grep Version
Version: 2.3.3+dfsg-1.pgdg16.04+1
Version: 2.2.1+dfsg-2

I've installed GEOS, PROJ.4 and GDAL following this https://docs.djangoproject.com/en/1.11/ref/contrib/gis/install/geolibs/

Thanks!

Claude Paroz

unread,
Sep 18, 2017, 3:00:45 PM9/18/17
to geod...@googlegroups.com
Le 18. 09. 17 à 20:10, Francisco Roldan a écrit :
>  apt-cache show libgeos-dev | grep Version
> Version: 3.5.0-1ubuntu2
>
> apt-cache show liblwgeom-dev | grep Version
> Version: 2.3.3+dfsg-1.pgdg16.04+1

This shows that you have the pgdg repository activated. So you have a
mix of Ubuntu and pgdg packages, which explains your issues.

Anyway, this is not a Django-related issue, so I suggest you get help
from your distribution, trying to get back to pure Ubuntu packages, and
then your problem will probably be solved.

Claude

> Version: 2.2.1+dfsg-2
>
> I've installed GEOS, PROJ.4 and GDAL following
> this https://docs.djangoproject.com/en/1.11/ref/contrib/gis/install/geolibs/
>
> Thanks!
>
>
> El lunes, 18 de septiembre de 2017, 12:59:54 (UTC-3), Claude escribió:
>
> Le 18. 09. 17 à 17:27, Francisco Roldan a écrit :
> > When I try to create a postgis extension the follow error is raised:
> >
> > |CREATEEXTENSION postgis;ERROR:could notloadlibrary
> > "/usr/lib/postgresql/9.5/lib/postgis-2.3.so
> <http://postgis-2.3.so>":/usr/lib/liblwgeom-2.3.so.0:undefined
> > symbol:GEOSClipByRect|
> >
> > For the installation, I have followed this guide:
> >
> https://docs.djangoproject.com/en/1.11/ref/contrib/gis/install/geolibs/
> <https://docs.djangoproject.com/en/1.11/ref/contrib/gis/install/geolibs/>
>
> >
> > Ubuntu: 16.04
> >
> > Postgres: 9.5.8
>
> I suspect a problem with certain package versions.
> Could you tell us which version you have for liblwgeom and libgeos?
>
> Do you have other GIS-related external package repositories enabled?
>
> Claude
> --
> www.2xlibre.net <http://www.2xlibre.net>

Francisco Roldan

unread,
Sep 18, 2017, 4:04:36 PM9/18/17
to geodjango
Thanks for your time Claude, I will go these way.
Reply all
Reply to author
Forward
0 new messages