Undefined symbol when installing R package - r

So probably this is some odd setting I've added, but removing my .Renviron/.Rprofile/~/.R/Makevars don't seem to help. Grateful for any suggestions on how to debug.
BiocManager::install("DropletUtils") leads to this error (normal output up to this point omitted):
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘DropletUtils’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/alan/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-DropletUtils/00new/DropletUtils/libs/DropletUtils.so':
/home/alan/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-DropletUtils/00new/DropletUtils/libs/DropletUtils.so: undefined symbol: __ubsan_vptr_type_cache
Error: loading failed
Execution halted
sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] BiocManager_1.30.12 compiler_4.0.5 tools_4.0.5
[4] parallel_4.0.5

Related

Unable to load shared object xgboost.so and libstdc++.so.6: version `GLIBCXX_3.4.23' not found while installing Xgboost

I am getting an error when I am trying to install xgboost_1.3.2.1 in R V4.0.5
The error
Error: package or namespace load failed for ‘xgboost’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/opt/R/4.0.5/lib/R/library/00LOCK-
xgboost/00new/xgboost/libs/xgboost.so':
/usr/local/lib64/libstdc++.so.6: version `GLIBCXX_3.4.23' not found (required by
/opt/R/4.0.5/lib/R/library/00LOCK-xgboost/00new/xgboost/libs/xgboost.so)
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/opt/R/4.0.5/lib/R/library/xgboost’
The session info :
R version 4.0.5 (2021-03-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux
Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblasp-r0.3.3.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.5 magrittr_2.0.1 Matrix_1.3-2 tools_4.0.5 grid_4.0.5
data.table_1.14.0
[7] lattice_0.20-41
I can install the XGboost in the linux with no problem. But when I try to load it in the Rstudio Server, I still get the same error
library("xgboost")
Error: package or namespace load failed for ‘xgboost’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/opt/R/4.0.5/lib/R/library/xgboost/libs/xgboost.so':
/usr/local/lib64/libstdc++.so.6: version `GLIBCXX_3.4.23' not found (required by /opt/R/4.0.5/lib/R/library/xgboost/libs/xgboost.so)

R package compilation problem due to LAPACK on Ubuntu 20.04 after upgrade from 18.04

I have upgraded Ubuntu from 18.04 to 20.04 and now some of my R packages fail to compile/load. One example is shown below:
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for 'myPackage' in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/lib/R/site-library/00LOCK-my_package/00new/myPackage/libs/myPackage.so':
/usr/local/lib/R/site-library/00LOCK-my_package/00new/myPackge/libs/myPackage.so: undefined symbol: dgesvx_
Error: loading failed
Execution halted
ERROR: loading failed
This dgesvx_ looks like a LAPACK problem (https://www.netlib.org/lapack/explore-html/d7/d3b/group__double_g_esolve_ga9d90ccf6e340cacd08b7bbbb502ceb21.html#ga9d90ccf6e340cacd08b7bbbb502ceb21).
And I have latest LAPACK version available in Ubuntu 20.04 installed (3.9.0-1build1).
What can I do here to resolve the problem?
My sessionInfo():
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.1 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.2 tools_4.0.2

Install package geogrid in R

I have the following code, basic a error message in R. Please what can i do about. I don t know what to do. error message. Please send me codes,
Hello guys i am trying to use R with Rstudio please
RcppExports.cpp:4:27: fatal error: RcppArmadillo.h: Arquivo ou diretório não encontrado compilation terminated.
/usr/lib/R/etc/Makeconf:168: recipe for target 'RcppExports.o' failed
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘geogrid’
* removing ‘/home/gabriel/R/x86_64-pc-linux-gnu-library/3.4/geogrid’
Warning in install.packages :
installation of package ‘geogrid’ had non-zero exit status
SEssion INFO
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=pt_BR.UTF-8
[2] LC_NUMERIC=C
[3] LC_TIME=pt_BR.UTF-8
[4] LC_COLLATE=pt_BR.UTF-8
[5] LC_MONETARY=pt_BR.UTF-8
[6] LC_MESSAGES=pt_BR.UTF-8
[7] LC_PAPER=pt_BR.UTF-8
[8] LC_NAME=C
[9] LC_ADDRESS=C
[10] LC_TELEPHONE=C
[11] LC_MEASUREMENT=pt_BR.UTF-8
[12] LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] dplyr_0.7.6 ggplot2_3.0.0
loaded via a namespace (and not attached):
The non-zero exit status simply indicates that there was an error during the installation of the "package".
File link https://cran.r-project.org/src/contrib/geogrid_0.1.0.1.tar.gz
Try with the following command:
install.packages('FILE_PATH', repos=NULL, type = "source",dependencies = TRUE)
Doing so, all the dependencies for the package will also be downloaded.
Downloading from source will recompile the package and installs.

Why I get unable to load an R package error after a while?

I have installed a package in our server already and was working properly.
After a few hourse, once I wanted to load it again, I'm getting the following error:
library("SPONGE")
Error: package or namespace load failed for ‘SPONGE’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/adinfo/R/x86_64-pc-linux-gnu-library/3.4/gRbase/libs/gRbase.so':
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/adinfo/R/x86_64-pc-linux-gnu-library/3.4/gRbase/libs/gRbase.so)
I've also tried to install it again using
source("https://bioconductor.org/biocLite.R")
biocLite("SPONGE")
But I've got again the error that "Installation has zero exit"
Can someone help me with that?
> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 8 (jessie)
Matrix products: default
BLAS: /TL/opt/R-3.4.0/lib/libRblas.so
LAPACK: /TL/opt/R-3.4.0/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.0 tools_3.4.0
>

Unable to load shared object Undefined symbol in h5 package, ubuntu 14.04

I am trying to install h5 package in ubuntu 14.04. Before doing so, I have installed hdf5 package, updated the CPPFLAGS and LIBS flags. It is able to link to them correctly. However, after the compiling steps, it is unable to load the package and is giving an error,
Error: package or namespace load failed for ‘h5’ in dyn.load(file, DLLpath = DLLpath, ...)
sessionInfo
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.0
LAPACK: /usr/lib/lapack/liblapack.so.3.0
locale:
[1] LC_CTYPE=en_IN LC_NUMERIC=C LC_TIME=en_IN
[4] LC_COLLATE=en_IN LC_MONETARY=en_IN LC_MESSAGES=en_IN
[7] LC_PAPER=en_IN LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_IN LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.0
I have taken care in ensuring that all the dependent package versions are as mentioned in the package requirements.
Will be grateful if someone can help me.

Resources