Hi all,
I've been trying to install and use xps package for weeks, without any success :(
I carefully read installation instructions for root and looked for help in several forums. Based on this information, I already tried to install versions ftp://root.cern.ch/root/root_v5.34.05.macosx106-x86_64-gcc-4.2.tar.gz and ftp://root.cern.ch/root/root_v5.26.00c.macosx106-x86_64-gcc-4.2.tar.gz (based on this post https://support.bioconductor.org/p/55744/) both in my home directory and in /usr/local
After downloading the source, I run the commands:
cd root
. bin/thisroot.sh
However, I've been getting this error message constantly when trying to load xps package on R:
> library(xps)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/xps/libs/xps.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/xps/libs/xps.so, 6): Library not loaded: /usr/local/root/lib/root/libGui.so Referenced from: /Library/Frameworks/R.framework/Versions/3.2/Resources/library/xps/libs/xps.so
Reason: image not found
Error: package or namespace load failed for ‘xps’
Here is my session info:
> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.3 (Yosemite)
locale:
[1] C/UTF-8/C/C/C/C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] BiocInstaller_1.18.2
loaded via a namespace (and not attached):
[1] tools_3.2.0
Could somebody help me with this issue? Thanks a lot!
Dear Christian,
Thanks a lot for you comment. I'll try to do what you suggested and I'll let you know if I could successfully install root and xps.
Best regards,
Mari
Dear Christian,
Now I could make it work! :-)
Interestingly, it only works when using R in shell terminal. I normally use RStudio, but I could not install or load the xps package in Rstudio. Is this expected?
Many thanks for your help!!
Mari
This is because in order for ROOT to work, it requires that the variables defined in that
.bashrc
available in the working environment.When you launch a terminal session,
.bashrc
is run, and those variables that you put in there get defined. GUI apps get their environment variables via a different mechanism. The recommended way to define global environment variables that GUI apps have access to changes with different versions of OSX, so you can google how to do it "officially".An easy way to get it to work, however, is to simply open RStudio from the command line, ie. fire up a terminal and run the following command:
I believe that should do the trick.