I keep getting the following error when attempting to install readxl or haven in R (both dependencies of tidyverse) post-compilation,
I put the export LD_LIBRARY_PATH=... statements into a file ~/.profile.
This way, both command line R and RStudio Server are able to find the shared library.
In my case, I was trying to get the Rglpk package to locate the libglpk.so file.
According to Stefaan Lippen's blog entry, the .profile file is the preferred location for these type of configurations not strictly related to bash.