GeoDjango - GDAL library giving error

纵然是瞬间 提交于 2019-12-03 23:08:21

So, for the record, the answer was to add the library path /usr/local/lib/ to /etc/ld.so.conf, then run $ sudo ldconfig

sudo ldconfig

Often is all you need. Just check /etc/ld.so.conf before you start adding paths, /usr/local/lib may already be listed.

According to django documentation 'The most common problem when installing GeoDjango is that the external shared libraries (e.g., for GEOS and GDAL) cannot be located.'

The usual path for gdal library installed via source is /usr/local/lib, Therefore if you run the bash command:

export LD_LIBRARY_PATH=/usr/local/lib

python should then be able to find

$ sudo echo /usr/local/lib >> /etc/ld.so.conf
$ sudo ldconfig

https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#setting-system-library-path

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!