[R-sig-Geo] [R] Drawing Maps of detailed Australian regions

Jim Lemon jim at bitwrit.com.au
Sat Dec 18 02:01:07 CET 2010


On 12/17/2010 11:25 PM, Roger Bivand wrote:

First, thanks for taking the time to look at this and suggest something 
that has at least gotten me past the missing library problem. What I 
have done so far is to find what appeared to be a solution for each 
problem as it appeared and follow the instructions given.
> ...
> NO!
>
> On Unix/Linux, please read up about ldconfig, and make sure that the
> shared object is in the correct path (once you have a good understanding
> of ldconfig). You seem to be using a Windows tactic of placing an
> apparently missing DLL in an apparently visible directory. Doing it
> right is really easy, and always works unless one scatters multiple *.so
> around. You have multiple libgdal.so installed. You need to establish
> which one was the one rgdal.so was build against, and ensure that it is
> in the path. Then all of the remaining dependencies will fulfill
> automatically.
>
> If you want to see what your rgdal.so depends on, do:
>
> ldd rgdal.so
>
> Then make sure that that/those directories are included in the path
> established by ldconfig (most will be, but /usr/lib/ogdi and
> /home/jim/Download/FWTools-2.0.6/lib will not), or in an environment
> variable (set for example in your .bashrc) LD_LIBRARY_PATH. In general,
> binary installs should run ldconfig themselves, but you are - below -
> probably missing a symbolic link in /usr/lib, and appear to not to have
> installed the binaries satisfactorily.
>
This showed where the libraries should go, and after I had fixed all of 
the "not found" libraries, rgdal.so seems to be able to find them.

> I'm not sure from the thread that you explained how you installed rgdal,

I used "install.packages" which failed until I had installed all the 
GDAL stuff, then started reporting the "can't find" errors

> or whether you subsequently changed any of the things it depends on. For
> a clean install, do:
>
> R CMD check rgdal_*.tar.gz
>
> Complete the dependencies until it passes. Once it passes, you are good
> to go:
>
> R CMD INSTALL rgdal_*.tar.gz
>
> I think that your GDAL and PROJ4 installs are wrong/insufficient - for
> yum I would look for gdal, gdal-devel, proj, proj-devel, proj-nad, and
> possibly proj-epsg (see inst/README in the source package). Installing
> PROJ.4 and GDAL from source is often less trouble than handling multiple
> binaries, unless you set environment variable LD_LIBRARY_PATH, or use
> ldconfig, consistently, so that rgdal.so can "see" what it depends on.
> But do try to check with the source package first, because then the
> checked dependency routes should remain valid (until something is changed).
>
> It is always sensible to run at least:
>
> gdal-config --version
> gdalinfo --version
> proj -l
>
> from the command line, to check that GDAL and PROJ4 utility programs
> find their own shared objects, and that the two gdal* commands report
> the same version.
>
I have 1.6.0 for gdal-config and 1.6.1 for gdalinfo, and proj reports an 
immense amount of stuff, but gives no errors.

I really do appreciate your help, but I have wasted far too much of 
other people's time, so I am going to try to wipe everything and start 
again. If I succeed, I'll let you know.

Jim



More information about the R-sig-Geo mailing list