rgl install failure in Rstudio on mac - r

rgl installed
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
Warning message:
In pacman::p_load(rgl) : Failed to install/load:
rgl

You don't really post a question (hence the negative scores others have given you), but it appears that the error message is telling you that rgl is failing to load because libGLU.1.dylib is not found.
You can probably fix this by installing XQuartz, since it looks like you're on a Mac. Go to https://www.xquartz.org to get it.

Related

Unable to load RWeka package

I have tried adding the path in the terminal using the solution given here and it said was successfully added but still I am unable to load the RWeka package.
It is giving me the below error -
Error: package or namespace load failed for ‘RWeka’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rJava/libs/rJava.so, 6): Symbol not found: _EXTPTR_PTR
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rJava/libs/rJava.so
Expected in: /Library/Frameworks/R.framework/Resources/lib/libR.dylib
in /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rJava/libs/rJava.so
In addition: Warning message:
package ‘RWeka’ was built under R version 4.0.2
What could be done? Please Help!

Conflicts between MacOS High Sierra and R packages

I am running MacOS 10.13 (High Sierra) and recently updated to R version 3.4.3 and R studio version 1.1.419. For some reason the rJava package is not working...tried several fixes from here on stackoverflow and nothing works. Also, the digest package will not load so I can no longer use ggplot2. Any suggestions?
Error for Java:
> library("rJava", lib.loc="/Library/Frameworks/R.framework/Versions/3.4/Resources/library")
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: #rpath/libjvm.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so
Reason: image not found
Error for digest package:
> library("rJava", lib.loc="/Library/Frameworks/R.framework/Versions/3.4/Resources/library")
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: #rpath/libjvm.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so
Reason: image not found
New Mac OSX releases have a documented problem of messing up the Java path in R/RStudio (see here). It looks as though that this is what you're encountering here.
If you check out the question I've linked above, hopefully you can find a solution that works to reset your path; both of the commands below worked for me.
dyn.load('/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/jre/lib/server/libjvm.dylib')
or
sudo ln -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib
I don't know about the problem with rJava, but digest was just updated so if you try to install the binary it may not compiled and built yet. If that ever happens (it's somewhat of a race condition/lag), you can try to reinstall form source:
install.packages("digest", type = "source")

Rblpapi - Error

I use Rblpapi package on a PC at work. I've tried to install it on my Mac at home, however, I get the below error. I'm not sure what the problem is... all other packages work. Any suggestions?
library(Rblpapi)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Users/wg/Library/R/3.3/library/Rblpapi/libs/Rblpapi.so':
dlopen(/Users/wg/Library/R/3.3/library/Rblpapi/libs/Rblpapi.so, 6): Library not loaded: #rpath/libblpapi3_64.so
Referenced from: /Users/wg/Library/R/3.3/library/Rblpapi/libs/Rblpapi.so
Reason: image not found
Error: package or namespace load failed for ‘Rblpapi’

Rugarch Package on R don't load on mac laptop

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.
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

Error in installing "rgl" package in Yosemite 10.10.4

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?
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

Resources