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

Related

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

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

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.

R packages: RCurl and curl packages install failure on Linux

I hope you can help with this issue I have come across whilst installing RCurl and curl packages for R.
Rd warning: /tmp/RtmpOBkvFC/R.INSTALLd07e6c06faf4/RCurl/man/url.exists.Rd:5: missing file link ‘file.exists’
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/majaidi/R/x86_64-redhat-linux-gnu-library/3.1/RCurl/libs/RCurl.so':
/lib64/libgssapi_krb5.so.2: symbol krb5int_buf_len, version krb5support_0_MIT not defined in file libkrb5support.so.0 with link time reference
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/majaidi/R/x86_64-redhat-linux-gnu-library/3.1/RCurl’
The downloaded source packages are in
‘/tmp/RtmpX6poG4/downloaded_packages’
Warning message:
In install.packages(pkgs = pkgs, lib = lib, repos = repos, ...) :
installation of package ‘RCurl’ had non-zero exit status`
That looks like that you have different versions of libcurl.
One approch could be the following one (for your console):
wget https://cran.r-project.org/src/contrib/curl_0.9.7.tar.gz
R CMD INSTALL curl_0.9.7.tar.gz --no-test-load
ldd /home/majaidi/R/x86_64-redhat-linux-gnu-library/3.1/curl/libs/curl.so
Then you can use ldd libcurl.so to find all dependencies and shared libraries to this.
Perhaps you can find some errors and/or you have to create a new LD_LIBRARY_PATH.
Good Luck!
J_F

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.

Resources