[R] setting LD_LIBRARY_PATH

Marc Schwartz marc_schwartz at comcast.net
Mon Mar 26 16:22:20 CEST 2007


On Mon, 2007-03-26 at 13:53 +0100, ian white wrote:
> Dear R-help,
> 
> I am trying to use a package (not from CRAN) which includes two shared
> library (.so) files. The maintainer suggests inserting two lines
> in /usr/bin/R,
> 
> LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:path-to-package/lib
> export LD_LIBRARY_PATH
> 
> This works, but I felt more comfortable putting the first line
> in .Renviron or $R_HOME/etc/Renviron.site. However this doesn't seem to
> work, and I cannot see why it doesn't.

Your best bet is to add the paths to the lib files in /etc/ld.so.conf
and then run /sbin/ldconfig to update the environment. Both of these
would be done as root (ie. su or sudo).

That way, you don't have to worry about editing application specific
files every time they get overwritten during an update.

HTH,

Marc Schwartz



More information about the R-help mailing list