[R] problem with RCurl install on Unix

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Mar 22 12:25:05 CET 2007


On Thu, 22 Mar 2007, Martin Maechler wrote:

>>>>>> "Steven" == Steven McKinney <smckinney at bccrc.ca>
>>>>>>     on Wed, 21 Mar 2007 19:29:43 -0700 writes:
>
>    Steven> I get the same problem, and haven't
>    Steven> figured it out yet.
>
>    Steven> Is it a 32bit/64bit clash?
>
> Well, I can install and run  RCurl  on both 32bit and 64bit
> (Redhat / FC6  Linux; with own compilers, extra libs, ...).
>
>    Steven> (Similarly, I don't have RMySQL up and running cleanly.)
>
>
>
>
>    >> library(RCurl)
>    Steven> Error in dyn.load(x, as.logical(local), as.logical(now)) :
>    Steven> unable to load shared library '/share/apps/R/R-2.4.1/library/RCurl/libs/RCurl.so':
>    Steven> libcurl.so.4: cannot open shared object file: No such file or directory
>    Steven> Error: package/namespace load failed for 'RCurl'
>
> You might need to set  LD_LIBRARY_PATH  correctly
> before starting R -- typically it would be set the same as it
> was when RCurl was installed (which includes a 'configure' !) on
> your system?  Or  RCurl's configure is not quite robust enough
> and did not check for the presence of a libcurl.so.4
>
> I assume
>
>  ldd /share/apps/R/R-2.4.1/library/RCurl/libs/RCurl.so

You may well need

R CMD ldd /share/apps/R/R-2.4.1/library/RCurl/libs/RCurl.so

as the R front end sets LD_LIBRARY_PATH.

> also tells about the missing  libcurl.so.4 ?
> Make sure you find that (in /usr/lib; /usr/local/lib, ... ?)
> and then set your LD_LIBRARY_PATH
> or even   'ldconfig' as root to make sure that libcurl.so.4 ``is
> found''.
> IMO the latter {correct ldconfig call / /etc/ld.so.conf setup}
> should have happened as part of the installation of the curl
> library.

I find it very common for software packages to install into 
/usr/local/lib (not lib64) and not to think about the ldconfig paths.
Both are things that RPMs tend to correct.

> On the 64-bit architecture, note that
>
> > system(paste("ldd", dir(system.file("libs", package = "RCurl"), full=TRUE)))
>
> finds all libraries in /lib64 and /usr/lib64 .

I think you mean on Redhat-based AMD64 Linux.  This is something that 
differs by 64-bit architecture (ia64 uses /lib) and also Linux distro (at 
least in the past).

RMySQL does not install out of the box on any of our 64-bit systems 
(another lib vs lib64 issue), and I've sent patches to the maintainer.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list