Skip to content
Prev 26873 / 29559 Next

RGDAL installation fail after yum upgrade

On Fri, 21 Sep 2018, Rich Shepard wrote:

            
Rich: thanks - having multiple versions is indeed a challenge on platforms 
where R uses dynamically loaded libraries. On Windows and MacOS, most CRAN 
packages with external dependencies are built with static linking (the 
*old* way). However, executables are on the PATH, but dynamically loaded 
libraries - shared objects - are on LD_LIBRARY_PATH. Try:

echo $LD_LIBRARY_PATH

at the shell prompt, then inside R:

Sys.getenv("LD_LIBRARY_PATH")

and you'll see that R may have made modifications on startup. A typical 
trap is also forgetting to run /sbin/ldconfig -v as root after installing 
software in /usr/local/lib (and adding /usr/local/lib to a file in 
/etc/ld.so.conf.d) so that the shared objects are visible.

The easier route is to have just one version of external software 
installed where R can see it; it is harder but possibly on a cluster 
necessary to modify LD_LIBRARY_PATH locally and consistently. Also look at 
closed sf issues on github; there we stepped back from messing with 
LD_LIBRARY_PATH on a general basis.

Hope this helps,

Roger