AttributeError: /usr/lib/ogdi/libgdal.so: undefined symbol: GDALVersionInfo

こ雲淡風輕ζ 提交于 2019-12-20 05:59:23

问题


I have setup the database using geodjango documentation and when I am doing

python manage.py sqlall world

I am getting this error:

OSError: /home/nishant-un/local/lib/libgdal.so: cannot open shared object file: No such file or directory

And when I

locate libgdal.so

I found it in:

/usr/lib/ogdi/libgdal.so

So I changed the GeoDjango Settings:

GDAL_LIBRARY_PATH = '/home/nishant-un/local/lib/libgdal.so'

to

GDAL_LIBRARY_PATH = '/usr/lib/ogdi/libgdal.so'

Then When I do python manage.py sqlall world again:

I get the error as:

AttributeError: /usr/lib/ogdi/libgdal.so: undefined symbol: GDALVersionInfo

Does anyone has Any idea why am I getting this error .. ?

`


回答1:


Okay I got the answer, I Uncommented the two lines in the settings.py and it started working.

# GEOS_LIBRARY_PATH = '/usr/lib/libgeos_c.so.1'

# GDAL_LIBRARY_PATH = '/usr/lib/ogdi/libgdal.so'


来源:https://stackoverflow.com/questions/21513980/attributeerror-usr-lib-ogdi-libgdal-so-undefined-symbol-gdalversioninfo

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