1

I am having problems loading rugarch package on R and I really need that package for my thesis.

I have no problem installing it. But when I try to load it I receive the following error message:

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

Any suggestions ?

Any help would be appreciated.

scott_lotus
  • 3,171
  • 22
  • 51
  • 69
  • Have you installed the package `rgl`? https://cran.r-project.org/web/packages/rgl/index.html The error indicates that this package is needed. – J_F Jun 19 '16 at 11:54
  • @J_F I installed the package rgl and know I have this problem: Loading required package: parallel 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.3/Resources/library/rgl/libs/rgl.so' But there is a lot of packages with the name parallel – João Manuel Teodoro Jun 19 '16 at 12:01
  • library(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.3/Resources/library/rgl/libs/rgl.so': > And this also happens to rgl package @J_F. So strange I cannot load these packages – João Manuel Teodoro Jun 19 '16 at 12:07
  • Have you installed a c++ compiler for OSX? https://developer.apple.com/xcode/downloads/ – J_F Jun 19 '16 at 18:04

1 Answers1

0

This answer is a bit 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 onto your Mac.

See Stackoverflow answers here and here

Greg H
  • 1,057
  • 12
  • 16