Skip to content
Prev 247437 / 398503 Next

problem installing rgdal

On Sun, 16 Jan 2011, alessandro.sarretta at inwind.it wrote:

            
You would do better to ask on R-sig-geo for this particular package, 
and ask the maintainer or on R-devel more generally about installing 
source packages (see the posting guide).  But

- Your R is need of updating (see the posting guide)
- GDAL 1.7.0 is really rather old
- The bug seems to be in your libgdal installation: if libgdal was 
compiled with sqlite support, libgdal.so should be linked to 
libsqlite3.  Do you have sqlite3 installed (not the RSQLite package, 
but the uduntu package)?  If not, please install it.  You can check 
for missing dependencies by (in the terminal)

ldd /usr/lib/libgdal.so

If 'libsqlite3.so.0' is not there, you need to modify rgdal (I know, 
because you need to do similar things with a static libgdal).  On my 
Mac I need to alter rgdal/src/Makevars.in to be

PKG_LIBS=@PKG_LIBS@ -lproj -lsqlite3 -lexpat -ltiff -ljpeg -lpng -lz -ldl -lcurl -lssl -lcrypto -lz

and so I guess you need at least

PKG_LIBS=@PKG_LIBS@ -lsqlite3

But because GDAL can be installed with lots of optional facilities 
(one of which is sqlite3), you may need to ask Ubuntu support for 
exactly what is needed to link against their build.  Or compile 
current GDAL from the sources for yourself.