[R-sig-Geo] Error to load rgdal

Tim Keitt tkeitt at mail.utexas.edu
Thu May 12 16:40:21 CEST 2005


I've had good luck in the past with binary GDAL rpm's and rgdal on
Fedora. (I've since switched to Gentoo which compiles everything from
source, so this sort of thing almost never happens. Oh, and GDAL is in
portage stable.)

The most likely culprit is changes to the underlying libraries. You may
have to try a few versions of GDAL, libgif, libtif, etc. It looks like
the missing symbol might belong to libgif. Is it installed? Also, can
you use gdalinfo on a gif or tif file? We probably do need to add some
checks on the GDAL version being compiled against. Its api has changed
on past occasions breaking rgdal.

THK

On Thu, 2005-05-12 at 10:39 +0200, Roger Bivand wrote:
> On Thu, 12 May 2005, Susumu Tanimura wrote:
> 
> > Dear elijah
> > 
> > Thank you very much for your reply.
> > 
> > $ ldd /usr/lib/R/library/rgdal/libs/rgdal.so
> >         libR.so => not found
> >         libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40276000)
> >         libm.so.6 => /lib/i686/libm.so.6 (0x4032e000)
> >         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40350000)
> >         libc.so.6 => /lib/i686/libc.so.6 (0x40358000)
> >         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> > $ locate libR.so
> > /usr/lib/R/lib/libR.so
> > 
> > So, I added /usr/lib/R/lib in /etc/ld.co.conf and did /sbin/ldconfig.
> > Then the result of ldd was changed.
> > 
> > $ ldd /usr/lib/R/library/rgdal/libs/rgdal.so
> >         libR.so => /usr/lib/R/lib/libR.so (0x40276000)
> >         libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x404f2000)
> >         libm.so.6 => /lib/i686/libm.so.6 (0x405aa000)
> >         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x405cc000)
> >         libc.so.6 => /lib/i686/libc.so.6 (0x405d4000)
> >         libg2c.so.0 => /usr/lib/libg2c.so.0 (0x4070f000)
> >         libreadline.so.4 => /usr/lib/libreadline.so.4 (0x4072d000)
> >         libncurses.so.5 => /usr/lib/libncurses.so.5 (0x40759000)
> >         libdl.so.2 => /lib/libdl.so.2 (0x40799000)
> >         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> >         libgpm.so.1 => /usr/lib/libgpm.so.1 (0x4079c000)
> > 
> > Nevertheless, there is the same failure.
> > 
> > > library(rgdal)
> > Loading required package: abind
> > Loading required package: pixmap
> > Error in dyn.load(x, as.logical(local), as.logical(now)) : 
> >         unable to load shared library '/usr/lib/R/library/rgdal/libs/rgdal.so':
> >   /usr/lib/R/library/rgdal/libs/rgdal.so: undefined symbol: DGifCloseFile
> > Error in library(rgdal) : .First.lib failed for 'rgdal'
> > 
> > Could you give me further advice?
> 
> What does:
> 
> $ gdalinfo --version
> GDAL 1.2.6.0, released 2005/03/13
> 
> report for you? I do not think you have installed GDAL properly, my ldd on 
> rgdal.so lists libgdal.so and its (many) dependencies, these are missing 
> for you (the dependency on R is not at all necessary):
> 
> $ ldd /home/rsb/topics/Ris210/lib/R/library/rgdal/libs/rgdal.
> so
>         libgdal.so.1 => /usr/local/lib/libgdal.so.1 (0x003f0000)
>         libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x00bcb000)
>         libm.so.6 => /lib/tls/libm.so.6 (0x00335000)
>         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x002e7000)
>         libc.so.6 => /lib/tls/libc.so.6 (0x00111000)
>         libodbc.so.1 => /usr/lib/libodbc.so.1 (0x00d86000)
>         libungif.so.4 => /usr/lib/libungif.so.4 (0x00249000)
>         libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00935000)
>         libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00251000)
>         libz.so.1 => /usr/lib/libz.so.1 (0x008ba000)
>         libdl.so.2 => /lib/libdl.so.2 (0x00bb0000)
>         libpq.so.3 => /usr/lib/libpq.so.3 (0x0095c000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00312000)
>         libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00274000)
>         libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x0072e000)
>         libssl.so.4 => /lib/libssl.so.4 (0x00284000)
>         libcrypto.so.4 => /lib/libcrypto.so.4 (0x00971000)
>         libkrb5.so.3 => /usr/kerberos/lib/libkrb5.so.3 (0x00357000)
>         libcrypt.so.1 => /lib/libcrypt.so.1 (0x003b5000)
>         libresolv.so.2 => /lib/libresolv.so.2 (0x002b8000)
>         libnsl.so.1 => /lib/libnsl.so.1 (0x00c92000)
>         libgssapi_krb5.so.2 => /usr/kerberos/lib/libgssapi_krb5.so.2 (0x00d10000)
>         libcom_err.so.3 => /usr/kerberos/lib/libcom_err.so.3 (0x002ca000)
>         libk5crypto.so.3 => /usr/kerberos/lib/libk5crypto.so.3 (0x00cd4000)
> 
> It is almost never a good idea to install binary on Linux, almost always a 
> good idea to install GDAL from source, then install rgdal from source, 
> which is simple:
> 
> > install.packages("rgdal")
> 
> which then makes sure that all the bits and pieces are lined up correctly.
> 
> Please let the list know if this helps.
> 
> Roger
> 
> 
> > 
> > --
> > Susumu Tanimura
> > 
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo at stat.math.ethz.ch
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> > 
> 
-- 
Tim Keitt
Section of Integrative Biology
http://www.keittlab.org/




More information about the R-sig-Geo mailing list