<div dir="ltr">Hi everyone,<br><br>I'm getting a new machine setup and have hit a snag with the GDAL installation. I've installed GDAL from source onto a CentOS box using the gdal-1.5.2.tar.gz file, and with the following parameters:<br>
<br>$ sudo ./configure --prefix=/export --with-pg=/export/bin/pg_config --with-python<br>$ make<br>$ make install<br>$ which gdalinfo<br> /export/bin/gdalinfo<br>--> Good!<br><br>The problem comes when I try to import the osgeo module in Python.<br>
<br>$ python<br>Python 2.3.4 (#1, Dec 11 2007, 05:28:55)<br>[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2<br>Type "help", "copyright", "credits" or "license" for more information.<br>
>>> from osgeo import gdal<br>Traceback (most recent call last):<br> File "<stdin>", line 1, in ?<br>ImportError: No module named osgeo<br>--> Not good.<br><br>Looking back through the make output, I see that the osgeo modules are being created and copied:<br>
copying build/lib.linux-x86_64-2.3/osgeo/gdal.py -> /export/lib64/python2.3/site-packages/osgeo<br><br>So I tried appending the location to the sys.path in Python to make the modules available, but am only partially succesful with that:<br>
[root@randre-linux ~]# python<br>Python 2.3.4 (#1, Dec 11 2007, 05:28:55)<br>[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2<br>Type "help", "copyright", "credits" or "license" for more information.<br>
>>> import sys<br>>>> sys.path.append('/export/lib64/python2.3/site-packages/')<br>>>> import osgeo<br>--> Good!<br><br>>>> from osgeo import gdal<br>Traceback (most recent call last):<br>
File "<stdin>", line 1, in ?<br> File "/export/lib64/python2.3/site-packages/osgeo/gdal.py", line 7, in ?<br> import _gdal<br>ImportError: libgdal.so.1: cannot open shared object file: No such file or directory<br>
--> Not good.<br><br>So I'm guessing that my gdal libs aren't accessible for some reason, but I'm just guessing. Is there a way that I can fix this at the ./configure stage? <br><br>Thanks,<br><br>Roger<br>
--<br></div>