0

I get this message whenever I try to install rgl package on Yosemite 10.10.4

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.2/Resources/library/rgl/libs/rgl.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgl/libs/rgl.so, 6): Library not loaded: /opt/X11/lib/libGLU.1.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgl/libs/rgl.so
  Reason: image not found
Error: package or namespace load failed for ‘rgl’

How can I fix this?

  • Is X11 located in `/usr` or `/opt` in your computer? –  Jul 11 '15 at 04:59
  • I'm new mac user, so I dont know how to find out. I found it under utility folder in Apps but it is not installed – user5047207 Jul 11 '15 at 06:21
  • I installed it and it is in /usr – user5047207 Jul 11 '15 at 06:37
  • At this point it's not clear if the problem is solved by installing XQuartz (The X11 for Macs) or it persists. If it persists you should carefully describe the process you used to install X11. – IRTFM Jul 11 '15 at 15:56
  • I think I was totally confused about /opt and /usr. Discard my previous comment. The X11 is under /opt. – user5047207 Jul 12 '15 at 00:14

1 Answers1

0

Six years too late but for other people searching for a solution. The solution that worked for me is to download and install XQuartz https://www.xquartz.org

See Stackoverflow answers here and here

Greg H
  • 1,057
  • 12
  • 16