CentOS7 using R to install clusterProfiler get error about openssl - r

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

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

CentOS install R package RLumShiny failed

I tried to install the shiny related package RLumShiny on the server.
System Version: CentOS Linux release 8.1.1911 (Core)
I tried to use :
install.packages("RLumShiny")
Some errors were returned. But I can't find these errors now.
And then i tired to use :
wget https://cran.r-project.org/bin/macosx/contrib/4.1/RLumShiny_0.2.2.tgz
R CMD INSTALL RLumShiny_0.2.2.tgz
R
library("RLumShiny")
The server reported an error:
>library(RLumShiny)
Error: package or namespace load failed for ‘RLumShiny’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/shiny/R/x86_64-redhat-linux-gnu-library/4.1/terra/libs/terra.so':
/home/shiny/R/x86_64-redhat-linux-gnu-library/4.1/terra/libs/terra.so: invalid ELF header
Then i tried :
>install.packages("RLumShiny")
Installing package into ‘/home/shiny/R/x86_64-redhat-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
try open URL'https://mirror-hk.koddos.net/CRAN/src/contrib/RLumShiny_0.2.2.tar.gz'
Content type 'application/x-gzip' length 448539 bytes (438 KB)
==================================================
downloaded 438 KB
installing *source* package ‘RLumShiny’ ...
package ‘RLumShiny’ successfully unpacked and MD5 sums checked
using staged installation
R
inst
byte-compile and prepare package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/shiny/R/x86_64-redhat-linux-gnu-library/4.1/terra/libs/terra.so':
/home/shiny/R/x86_64-redhat-linux-gnu-library/4.1/terra/libs/terra.so: invalid ELF header
Calls: <Anonymous> ... namespaceImport -> loadNamespace -> library.dynam -> dyn.load
Execution halted
ERROR: lazy loading failed for package ‘RLumShiny’
* removing ‘/home/shiny/R/x86_64-redhat-linux-gnu-library/4.1/RLumShiny’
* restoring previous ‘/home/shiny/R/x86_64-redhat-linux-gnu-library/4.1/RLumShiny’
The downloaded source packages are in
‘/tmp/RtmpZxd0sL/downloaded_packages’
Warning message:
In install.packages("RLumShiny") :
installation of package ‘RLumShiny’ had non-zero exit status
How can this be fixed?
The problem is clearly with the terra package. So the way to fix it would be to (re-) install that package first; perhaps after installing its system requirements (see the repo) perhaps with
sudo dnf install gdal-devel proj-devel geos-devel sqlite-devel

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?

I am trying to install openssl package in R using Ubuntu 18.04 without success

I try to install the Openssl package in R (using RStudio in Ubuntu 18.04), but I get the error "undefined symbol: RSA_pkey_ctx_ctrl":
Error: package or namespace load failed for ‘openssl’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/danilo/R/x86_64-pc-linux-gnu-library/3.4/openssl/libs/openssl.so':
/home/danilo/R/x86_64-pc-linux-gnu-library/3.4/openssl/libs/openssl.so: undefined symbol: RSA_pkey_ctx_ctrl
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/danilo/R/x86_64-pc-linux-gnu-library/3.4/openssl’
Warning in install.packages :
installation of package ‘openssl’ had non-zero exit status.
I have already tried to install through both RStudio and Terminal, but as I am relatively new to Ubuntu, I did not have any success. I have the tar.gz file downloaded, but I don't know what should I do with it.
I actually want to use packages httr and ggmap, but they both require openssl.
Try in terminal:
sudo apt-get install libssl-dev
and after that try to install package openssl in R again.

Install R package - FSELCETOR on SUSElinux server

I have an account to Suse linux server, without root access.
I have installed an R , and now I want to use FSELECTOR package.
I have started with this steps:
$ whereis java
java: /usr/bin/java /usr/lib64/java /etc/java /usr/share/java /usr/share/man/man1/java.1.gz
$ R CMD javareconf -e
$unset JAVA_HOME
And then I have started R
Sys.setenv(JAVA_HOME='\\usr\\lib64\\java\\)
install.packages("FSelector")
During the installation process I have got this message:
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 '/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/rJava’
ERROR: dependency ‘rJava’ is not available for package ‘RWekajars’
* removing ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/RWekajars’
ERROR: dependencies ‘RWekajars’, ‘rJava’ are not available for package ‘RWeka’
* removing ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/RWeka’
ERROR: dependency ‘RWeka’ is not available for package ‘FSelector’
* removing ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/FSelector’
Any Ideа?
I want to install rJava, but i have got the same result.
Sys.setenv(JAVA_HOME='\\usr\\lib64\\jvm\\java-10-openjdk-10')
install.packages("rJava")
Installing package into ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
......
4 warnings
make[1]: Leaving directory '/tmp/RtmpTkyyj5/R.INSTALLb60f4541cb34/rJava/jri'
installing via 'install.libs.R' to /home/korosig/R/x86_64-suse-linux-gnu-library/3.5/rJava
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
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 '/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/korosig/R/x86_64-suse-linux-gnu-library/3.5/rJava’
The downloaded source packages are in
‘/tmp/RtmpcwM6XO/downloaded_packages’
Warning message:
In install.packages("rJava") :
installation of package ‘rJava’ had non-zero exit status
To install FSelector you need this [debian]
sudo apt-get install -y r-cran-randomforest
sudo apt-get install -y default-jre
sudo apt-get install -y default-jdk
sudo R CMD javareconf

Resources