Skip to content
Prev 352467 / 398498 Next

Common install of R on network disk

On Tue, Jul 7, 2015 at 2:42 AM, Lionel SPINELLI <spinelli at ciml.univ-mrs.fr>
wrote:
First, I am assuming that all the clients are running the same OS at the
same, or compatible, levels. I am also assuming Linux, but that may be
pushing it. What I _think_ will work (I can't test it where I am now) is to
set the LD_LIBRARY_PATH environment to include the directory which contains
the libicuuc.so file.

For a possible example, suppose libicucc.so is in the directory
/network/disk/R-installation/lib, then try the command (I am using BASH):

LD_LIBRARY_PATH="${LD_LIBRARY_PATH}${LD_LIBRARY_PATH+:}/network/disk/R-installation/lib"
R

Yes, the above is _ugly_. An easier way might be do to the following (as
root) on all the systems which want to run R (# is the command prompt for
"root", not something you type in!)

# echo "/netwrok/disk/R-installation/lib" >>/etc/ld.so.conf.d/R-network.conf
# ldconfig

What the above does is add the directory /network/disk/R-installation/lib
(which contains the R shared libraries) to the directories automatically
searched for shared libraries. You can add more that one directory name,
each on a separate line, into the R-network.conf file. Oh, the name of the
file can be anything you like but must be in the directory
/etc/ld.so.conf.d and end in ".conf". E.g. R-network.conf or
myIdiotBrother.conf would both work.

# echo "/network/disk1/R-installation/lib"
# echo "/network/disk2/R-2nd/lib" >>/etc/ld.so.conf.d/R-network.conf
# echo "/some/other/directory/entirely" >>/etc/ld.so.conf.d/R-network.conf
# ldconfig

would add the three mentioned directories.


This stackoverflow discussion might be of some help as well:
http://stackoverflow.com/questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux