I'm writing this as an utter Ubuntu newbie. I want to run the script found on Save points to a shapefile with GDAL. But I get the following error, yes this error is similar to the question posted here. Stick with me.
Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import point_store
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "point_store.py", line 3, in <module>
import osgeo.ogr
File "/usr/lib/python2.7/dist-packages/osgeo/__init__.py", line 21, in
<module>
_gdal = swig_import_helper()
File "/usr/lib/python2.7/dist-packages/osgeo/__init__.py", line 17, in
swig_import_helper
_mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: /usr/lib/python2.7/dist-packages/osgeo/_gdal.so: symbol
VSIFTruncateL, version GDAL_1.8 not defined in file libgdal.so.1 with link
time reference
After reading the question I reference above I tried this:
sudo pip install GDAL==1.8.1
And then I got the following error:
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for
Ada/C/ObjC but not for C++ [enabled by default]
extensions/gdal_wrap.cpp:149:20: fatal error: Python.h: No such file or
directory
compilation terminated.
error: command 'gcc' failed with exit status 1
Does anyone have an idea how I can get my gcc to happy fun times? There are lots of forum posts around about this error but I'm still looking for that "aha" moment.
sudo apt-get install build-essential python-all-dev
– Mike T Apr 20 '12 at 6:25