Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
741 views
in Technique[技术] by (71.8m points)

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

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 .. ?

`

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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'

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...