AttributeError:/usr/lib/ogdi/libgdal.so:未定义的符号:GDALVersionInfo

时间:2014-02-02 17:47:47

标签: python-2.7 postgis geodjango

我使用geodjango文档设置了数据库,当我在做

python manage.py sqlall world

我收到此错误:

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

当我

locate libgdal.so

我发现了:

/usr/lib/ogdi/libgdal.so

所以我更改了GeoDjango设置:

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

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

然后当我再次python manage.py sqlall world时:

我收到错误:

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

有没有人知道我为什么会收到这个错误..?

`

1 个答案:

答案 0 :(得分:0)

好的,我得到了答案,我取消注释settings.py中的两行并开始工作。

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

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