Installing Bioconductor highthroughputassays workflow gives rgl errors and fail to load - r

When I try to install the bioconductor workflow 'highthroughputassays' as follows (and as described here):
> source("http://bioconductor.org/workflows.R")
> workflowInstall("highthroughputassays")
It installs a lot of dependent packages, but just before ending the installation it gives the following errors:
No man pages found in package ‘highthroughputassays’
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'rgl', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Users/johansenkh/Library/R/3.3/library/rgl/libs/rgl.so':
dlopen(/Users/johansenkh/Library/R/3.3/library/rgl/libs/rgl.so, 6): Library not loaded: /opt/X11/lib/libGLU.1.dylib
Referenced from: /Users/johansenkh/Library/R/3.3/library/rgl/libs/rgl.so
Reason: image not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Users/johansenkh/Library/R/3.3/library/highthroughputassays’
Warning in install.packages :
installation of package ‘highthroughputassays’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/hb/sc3x6vtj0ys009qnyplbp2_h1g5hgm/T/RtmpDkWkRH/downloaded_packages’
Because of those errors, the workflow does not load;
library(flowStats)
gives a similar error after installing packages as described above.
I have tried it on 3 different Mac computers (all with the newest OS X, but one of them had the 3.3.1 version of R (The newest version is 3.3.2))
When trying library(rgl) I get the following error:
Error : .onLoad failed in loadNamespace() for 'rgl', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Users/johansenkh/Library/R/3.3/library/rgl/libs/rgl.so':
dlopen(/Users/johansenkh/Library/R/3.3/library/rgl/libs/rgl.so, 6): Library not loaded: /opt/X11/lib/libGLU.1.dylib
Referenced from: /Users/johansenkh/Library/R/3.3/library/rgl/libs/rgl.so
Reason: image not found
Error: package or namespace load failed for ‘rgl’

I solved the problem as follows:
The problem was with loading 'rgl'.
By installing XQUARTZ (www.XQUARTZ.com) followed by restarting OS X (Log out and log in) the rgl-package worked. Thereafter the workflow installed as indicated above.

Related

Error: package or namespace load failed for ‘RCurl’ in dyn.load(file, DLLpath = DLLpath, ...):

Error: package or namespace load failed for ‘RCurl’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-RCurl/00new/RCurl/libs/RCurl.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-RCurl/00new/RCurl/libs/RCurl.so, 0x0006): Library not loaded: '#rpath/libcurl.4.dylib'
Referenced from: '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-RCurl/00new/RCurl/libs/RCurl.so'
Reason: tried: '/Library/Frameworks/R.framework/Resources/lib/libcurl.4.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-17.0.1+12/Contents/Home/lib/server/libcurl.4.dylib' (no such file)
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RCurl’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RCurl’
Warning in install.packages :
installation of package ‘RCurl’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/9m/2mfljv2d3bbc0gdnxk892dzm0000gn/T/RtmpiKY9tT/downloaded_packages’
I found some solutions on Linux. On macOS, I don't see any solution.
I ran into the same issue. For me the issue was the conflicting curl-config installed system-wide on mac and the curl-config in my base conda environment that was getting auto-activated.
Steps that worked for me.
Run conda deactivate to deactivate the conda environment
Start R
Run the package installation again (install.packages("RCurl")).

error message trying to install homals package in R

I'm trying to install the Homals package - library(homals), but keep getting this error message:
library(homals)
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
‘homals’
I have a couple of my colleagues to run the same code, the same thing happens. I have re-install R studio to the newest version.
install.packages("rgl")
install.packages("homals")
library(homals)
Any solutions for this? thank you.
I was able to successfully install on both Windows and Mac. I believe the root cause here is that you have R version 3.3 installed when you require at least v3.5.3 as per below:
library(homals)
Warning message:
package ‘homals’ was built under R version 3.5.3

‘rJava’ could not be loaded after installing R version 3.4

Loading required package: xml2
Loading required package: rJava
Loading required package: methods
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/r Java.so
Reason: image not found
Error: package ‘rJava’ could not be loaded
Execution halted
I'm getting this error a day after I installed version 3.4 of R. I tried solutions from other pages but it didn't work. I can't run R scripts through the terminal but I run scripts on RStudio. I'm thinking that it might be a problem with paths, but I just wanted to double check here and confirm instead of getting myself into a deeper mess.

Problems with installing XVector package

I have problem with installing R package XVector.
I've tried to install it using biocLite:
Error: package or namespace load failed for ‘XVector’ in
dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object
'/home/fedorovaad/R/XVector/libs/XVector.so':
/home/fedorovaad/R/XVector/libs/XVector.so: undefined symbol:egzrewind
Error: loading failed
Execution halted
ERROR: loading failed
Also I used R CMD INSTALL XVector_0.16.0.tar.gz (the same error).
Besides I remove old version of Xvector (the same error...)
How can I fix it?

ggplot2 package failing to load

I just recently updated my Rstudio to the 0.98.1103 release and now I'm unable to load ggplot it keeps throwing the following error. Any ideas what is going on?
> library(ggplot2)
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /usr/X11/lib/libXft.2.dylib
Referenced from: /usr/local/lib/libtk8.6.dylib
Reason: image not found
Error: package or namespace load failed for ‘ggplot2
I tried removing the tcltk library and ggplot2 and reinstalling them now I'm getting a different set of errors:
> library(ggplot2)
Error : package ‘tcltk’ does not have a namespace
Error: package or namespace load failed for ‘ggplot2’
> library(tcltk)
Error in library(tcltk) : ‘tcltk’ is not a valid installed package
Seems like X11 is not installed on your system. Try installing xorg (if you're running Linux) or XQuartz if you're on OSX.

Resources