[R] Mysteriously vanishing LD_LIBRARY_PATH

Godmar Back godmar at gmail.com
Thu Jul 9 04:29:48 CEST 2009


R respects LD_LIBRARY_PATH, see /usr/lib/R/etc/ldpaths where it
prepends its own path to any value in the environment when R is
invoked:

if test -z "${LD_LIBRARY_PATH}"; then
  LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}"
else
  LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}"
fi
export LD_LIBRARY_PATH

=====

Provide the output of

echo $LD_LIBRARY_PATH
or
env | grep LD_LIBRARY_PATH

to check that it's set correctly *BEFORE* you invoke R.

 - Godmar

On Wed, Jul 8, 2009 at 9:45 PM, <p_connolly at slingshot.co.nz> wrote:
> Using R-2.8.0 and R-2.8.1, I get behaviour like this:
>
> R version 2.8.0 (2008-10-20)
> Copyright (C) 2008 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
>
> [....]
>
>> Sys.getenv("LD_LIBRARY_PATH")
>
>          LD_LIBRARY_PATH
> "/home/hrapgc/local/R-2.8.0/lib:/usr/local/lib:/usr/lib/gcj-4.1.1:/home/hrapgc/Rstuff/library/asreml/libs"
>> q()
> Save workspace image? [y/n/c]: n
>
>
> However:
>
> R version 2.9.1 (2009-06-26)
> Copyright (C) 2009 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
>
> [...]
>
>> Sys.getenv("LD_LIBRARY_PATH")
>                                                   LD_LIBRARY_PATH
> "/home/hrapgc/local/R-2.9.1/lib:/usr/local/lib:/usr/lib/gcj-4.1.2"
>
>
> I'm particularly dismayed by the fact that there are now only three
> parts to LD_LIBRARY_PATH, and slightly mystified by the appearance of
> /usr/lib/gcj-4.1.2 in place of /usr/lib/gcj-4.1.1.  Maybe that's a red
> herring since the former is a link to the latter.
>
> I would appreciate help getting the rest of LD_LIBRARY_PATH back.  I
> set it in ~/.bash_profile in case that makes a difference to the
> possible cause of the phenomenon.
>
> $ uname -r
> 2.6.18-92.1.22.el5
>
> The problem doesn't seem to arise with Fedora 8 nor with Mepis 6.5.
>
> TIA
>
> --
> Patrick Connolly
> HortResearch
> Mt Albert
> Auckland
> New Zealand
> Ph: +64-9 925 7079
> ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
> I have the world`s largest collection of seashells. I keep it on all
> the beaches of the world ... Perhaps you`ve seen it.  ---Steven Wright
> ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>




More information about the R-help mailing list