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

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.

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 to install RProtoBuf in R

When I tried to install RProtoBuf in R install.packages("RProtoBuf"), I have the following error message at the end of the installation
Testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘RProtoBuf’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/cloud/anaconda3/envs/acumos/lib/R/library/00LOCK-RProtoBuf/00new/RProtoBuf/libs/RProtoBuf.so':
/home/cloud/anaconda3/envs/acumos/lib/R/library/00LOCK-RProtoBuf/00new/RProtoBuf/libs/RProtoBuf.so: undefined symbol: _ZNK6google8protobuf10Reflection17GetRepeatedUInt64ERKNS0_7MessageEPKNS0_15FieldDescriptorEi
Error: loading failed
Execution halted
ERROR: loading failed
#removing ‘/home/cloud/anaconda3/envs/acumos/lib/R/library/RProtoBuf’
#restoring previous ‘/home/cloud/anaconda3/envs/acumos/lib/R/library/RProtoBuf’
Warning in install.packages : installation of package ‘RProtoBuf’ had non-zero exit status
The downloaded source packages are in ‘/tmp/Rtmpfj6wQF/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done , than
My configuration here :
OS : ubuntu 16.04.6 LTS xenial
conda : 4.7.10
anaconda navigator 1.9.7
R : 3.6.1
RStudio : 99.9.9
libprotoc 3.8.0
I installed protobuf thanks to : https://github.com/protocolbuffers/protobuf/blob/master/src/README.md? that solved some other issues.
I tried ./configure --prefix=/usr as explained in https://www.oipapio.com/question-2872905? but it doesn't work
I just expect to have RProtoBuf installed.

Cannot install rgdal package in R on RHEL6, unable to load shared object rgdal.so

I have AWS RHEL6 server where I've installed (compiled) rgdal 1.9.2 and proj packages. Now in R I want to install rgdal package but it gives this error:
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/Roel/R/x86_64-redhat-linux-gnu-library/3.3/rgdal/libs/rgdal.so':
libgdal.so.1: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/Roel/R/x86_64-redhat-linux-gnu-library/3.3/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status
Full install log can be found here.
When I do locate rgdal.so in Linux it doesn't find anything. I can also not find how to get rgdal.so of what it is part of.
Has anyone any idea on how to fix this?
I fixed it:
There is an error further up in the log as well that I had missed because of the error at the end:
./proj_conf_test: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory
libgdal.so.1 was on the system in /usr/local/lib.
I then did:
echo "/usr/local/lib" >> /etc/ld.so.conf.d/R-dependencies-x86_64.conf
ldconfig
This fixed the subsequent error that I mentioned in the OP.
If you see Permission Denied when running Roel's, try:
sudo ldconfig -c "echo '/usr/local/lib' >> /etc/ld.so.conf.d/R-dependencies-x86_64.conf"

Unable to install R package Cairo

I am trying to install the package Cairo on RedHat running R version 3.2.3. So far I have tried:
install.packages("Cairo")
R CMD INSTALL Cairo_1.5-9.tar.gz
Both the approaches giving me the same error below.
Error : .onLoad failed in loadNamespace() for 'Cairo', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/home/sandeep/R/x86_64-pc-linux-gnu-library/3.2/Cairo/libs/Cairo.so':
libpng15.so.15: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
I have tried the same logging in as root. Only the path for the shared library was different, error remained the same.
I have also tried installing packages mentioned below using
yum install cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel
Also, I have X11 libraries installed.

Rgdal package installation on Amazon Linux AMI

I've installed geos, proj-4.8.0 and gdal-1.9.2, yet, after installing the R package rgeos, rgdal fails to install.
Here is a look at my home directory:
. . . and the error I get running install.packages("rgdal", type="source"):
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/mainstorage/michaeld/R/x86_64-redhat-linux-gnu-library/3.1/rgdal/libs/rgdal.so':
libgdal.so.1: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/mainstorage/michaeld/R/x86_64-redhat-linux-gnu-library/3.1/rgdal’
The downloaded source packages are in
‘/tmp/Rtmpt51iFG/downloaded_packages’
Warning message:
In install.packages("rgdal", type = "source") :
installation of package ‘rgdal’ had non-zero exit status
I infer that this error has something to do with a dependent library. . . but that is all I gather.
I should mention that running sudo yum install libgdal1 libgdal1-dev libgeos libgeos-dev as suggested here yields the following:
No package libgdal1 available.
No package libgdal1-dev available.
Package geos-3.4.2-1.3.amzn1.x86_64 already installed and latest version
No package libgeos-dev available.
So, perhaps the better question is how do I install these dev packages?
Thanks for any direction.
You probably need to update the dynamic library cache, using ldconfig as superuser.
Alternatively, rather than building the packages from source, you can enable the Extra Packages for Enterprise Linux (EPEL) repository.

Resources