How to specify (non-R) library path for dynamic library loading in R?

后端 未结 5 1438
逝去的感伤
逝去的感伤 2020-12-14 02:47

I keep getting the following error when attempting to install readxl or haven in R (both dependencies of tidyverse) post-compilation,

5条回答
  •  时光取名叫无心
    2020-12-14 02:51

    These libraries really should be standard on RH-based system too, and be found.

    If you must add them to R, you have to do so before you start R. One way is via LD_LIBRARY_PATH, a better way is to edit a file in /etc/ld.so.conf.d/ (assuming RH/CentOS have that too). Else maybe via /etc/environment.

    Edit: If /etc/ is out of reach, you can do everything below $HOME. Standard shell instantiation works, and R has its own .Rprofile and .Renviron. You can have those below $HOME for all your projects, and/or in a per-project directory---see help(Startup).

提交回复
热议问题