Spatialite for GeoDjango can't be loaded on Ubuntu Wily Werewolf

476 views
Skip to first unread message

Berthier Lemieux

unread,
Nov 6, 2015, 6:03:10 PM11/6/15
to Django users
Hi!

When I try to use django.contrib.gis.db.backends.spatialite as my db engine on Ubuntu Wily Werewolf (15.10), I am getting the following error:

django.core.exceptions.ImproperlyConfigured: Unable to load the SpatiaLite library extension "libspatialite.so.7" because: /usr/local/lib/libspatialite.so.7: undefined symbol: sqlite3_spatialite_init

I get that error every time I'm running one of the manage.py operations. The same code works fine on previous Ubuntu buils (14.04).

I can work around that problem by using mod_spatialite, defining in my settings.py:

SPATIALITE_LIBRARY_PATH='/usr/local/lib/mod_spatialite.so'


The guys from the djangorestframework-gis seem to have decided to use the mod_spatialite https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=793526.

I wonder if the same should be done for /django/contrib/gis/db/backends/spatialite/base.py?

Tim Graham

unread,
Nov 7, 2015, 6:21:26 AM11/7/15
to Django users
Thanks for the report. I'd encourage you to use the geodjango mailing list to raise this issue.

Giorgos Ouzounoudis

unread,
Apr 20, 2016, 3:36:04 PM4/20/16
to Django users
I had the exactly same error on Ubuntu 16.04.
Reply all
Reply to author
Forward
0 new messages