On a Mac, the linker ld
looks at the variable $LIBRARY_PATH
I was trying to install Velocyto.R on Rstudio.
One of the pre-reqs is boost, I installed boost using brew install boost
, this links the boost libraries under
/usr/local/Cellar/boost/
to /usr/local/lib
.
However R was unable to find the boost libraries when installing velocyto.R I had to tell the linker to find the
required boost library by setting the environment variable: Sys.setenv(LIBRARY_PATH = "/usr/local/lib")
This R command
sets the environment variable LIBRARY_PATH and the linking program ld
can then find the required boost libraries.