Error running the packages "rgl' and "geomorph" on R on Mac
Asked Answered
A

0

6

I am trying to run the package "geomorph" on R. I know I need to install the packages "rgl' and "geomorph" and the following (respectively) to do so:

install.packages("rgl")

Then I:

require("rgl")

But for both the following error appeared:

> require("rgl")
Loading required package: rgl
Error : .onLoad failed in loadNamespace() for 'rgl', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/rgl/libs/rgl.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/rgl/libs/rgl.so, 6): Library not loaded: /opt/X11/lib/libGLU.1.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/rgl/libs/rgl.so
  Reason: image not found

Please help. Could it be that that I am running R on an OS X Yosemite? I read that there is currently a bug or feature in Yosemite that is causing errors for R users.

Antonelli answered 13/2, 2015 at 19:19 Comment(3)
One of the issues that some have come across with running R after upgrading to Yosemite is that some of the symlinks to the XQuartz libraries have been broken (See #26490428). I would recommend re-installing XQuartz as it re-establishes links at /opt/X11 and /opt/X11R6 which the installer is looking for.Doggo
Thanks, I ended up downloading XQuartz 2.7.7 and rgl & geomorph downloaded with no errors.Antonelli
@samP you should post this as an answer of your own questionStrohbehn

© 2022 - 2024 — McMap. All rights reserved.