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

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

Related

CentOS7 using R to install clusterProfiler get error about openssl

I've been having an unresolved error when I installed clusterProfiler using R on CentOS7. I have checked the information and some of them say it is the reason for installing the openssl version at the same time, but I have not found a specific solution.
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘openssl’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/lib64/R/library/00LOCK-openssl/00new/openssl/libs/openssl.so':
libssl.so.1.1: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/lib64/R/library/openssl’
ERROR: dependency ‘openssl’ is not available for package ‘httr’
* removing ‘/usr/lib64/R/library/httr’
ERROR: dependency ‘httr’ is not available for package ‘europepmc’
* removing ‘/usr/lib64/R/library/europepmc’
ERROR: dependency ‘europepmc’ is not available for package ‘enrichplot’
* removing ‘/usr/lib64/R/library/enrichplot’
ERROR: dependency ‘enrichplot’ is not available for package ‘clusterProfiler’
* removing ‘/usr/lib64/R/library/clusterProfiler’
do this operation can solve the problem:
yum install openssl-devel
yum info openssl-devel
pkg-config --modversion openssl

How do i install the "nloptr" package correctly on my MAC?

I tried to install the "nloptr" package in R. (I have a Mac) I have "nlopt" already installed but still get the following error when I try to install "nloptr".
Error: package or namespace load failed for ‘nloptr’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-nloptr/00new/nloptr/libs/nloptr.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-nloptr/00new/nloptr/libs/nloptr.so, 6): Symbol not found: _nlopt_add_equality_constraint
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-nloptr/00new/nloptr/libs/nloptr.so
Expected in: flat namespace
in /Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-nloptr/00new/nloptr/libs/nloptr.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/nloptr’
Warning in install.packages :
installation of package ‘nloptr’ had non-zero exit status
Can someone please help me with this?

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?

undefined symbol: gsl_multimin_fdfminimizer_conjugate_fr when trying to install topicmodels in R

I've been trying to install the topicmodels package in R for quite a few minutes. I've read many tutorials and installed the gsl package, but I'm still getting this error:
Error: package or namespace load failed for ‘topicmodels’ in dyn.load(file, DLLpath = DLLpath, ...):
impossível carregar objeto compartilhado '/home/sillas/R/x86_64-pc-linux-gnu-library/3.4/topicmodels/libs/topicmodels.so':
/home/sillas/R/x86_64-pc-linux-gnu-library/3.4/topicmodels/libs/topicmodels.so: undefined symbol: gsl_multimin_fdfminimizer_conjugate_fr
Erro: loading failed
Execução interrompida
ERROR: loading failed
* removing ‘/home/sillas/R/x86_64-pc-linux-gnu-library/3.4/topicmodels’
Warning in install.packages :
installation of package ‘topicmodels’ had non-zero exit status

Installing Bioconductor highthroughputassays workflow gives rgl errors and fail to load

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.

Resources