r-lib / gert

Simple git client for R
https://docs.ropensci.org/gert/
Other
146 stars 31 forks source link

Error when installing gert #208

Closed hfl112 closed 11 months ago

hfl112 commented 11 months ago

Got error when install gert. (R version 4.3.1)

R inst byte-compile and prepare package for lazy loading help installing help indices copying figures building package indices installing vignettes ** testing if installed package can be loaded from temporary location Error: package or namespace load failed for ‘gert’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/home/hef/Tools/miniconda3/lib/R/library/00LOCK-gert/00new/gert/libs/gert.so': /home/hef/Tools/miniconda3/lib/R/library/00LOCK-gert/00new/gert/libs/gert.so: undefined symbol: getentropy Error: loading failed Execution halted ERROR: loading failed

The downloaded source packages are in ‘/project02/gccri/hef/.tmp/RtmpCLB9Rk/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done Warning messages: 1: package(s) not installed when version(s) same as current; use force = TRUE to re-install: 'sequenza' 2: In install.packages(update[instlib == l, "Package"], l, contriburl = contriburl, : installation of package ‘gert’ had non-zero exit status

Any suggestions for this error?

jeroen commented 11 months ago

If you use conda it may be easier to install gert from anaconda: https://anaconda.org/conda-forge/r-gert

Otherwise you need to show us the full install log and details about your platform and compilers.

hfl112 commented 11 months ago

If you use conda it may be easier to install gert from anaconda: https://anaconda.org/conda-forge/r-gert

Otherwise you need to show us the full install log and details about your platform and compilers.

Thanks , it worked!

honghh2018 commented 8 months ago

I install in centos7.9 and then it get the same error,

I am manually install R package in centos7.9 not in virtualenv The gcc version was 9.3.0 the openssl version was 3.0.7

R info:

sessionInfo() R version 4.2.3 (2023-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS: /share/apps/R/R-4.2.3/lib64/R/lib/libRblas.so LAPACK: /share/apps/R/R-4.2.3/lib64/R/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_4.2.3 tools_4.2.3 the error info: 4/R/lib -lR installing to /share/apps/R/R-4.2.3/lib64/R/library/00LOCK-gert/00new/gert/libs R inst byte-compile and prepare package for lazy loading help installing help indices copying figures building package indices installing vignettes ** testing if installed package can be loaded from temporary location Error: package or namespace load failed for ‘gert’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/share/apps/R/R-4.2.3/lib64/R/library/00LOCK-gert/00new/gert/libs/gert.so': /share/apps/R/R-4.2.3/lib64/R/library/00LOCK-gert/00new/gert/libs/gert.so: undefined symbol: getentropy Error: loading failed Execution halted ERROR: loading failed

how to fix this issue ? Best, hanhuihong

jeroen commented 8 months ago

Can you show us the complete build output

honghh2018 commented 8 months ago

The total build output lying below:

install.packages('gert') trying URL 'https://mirrors.bfsu.edu.cn/CRAN/src/contrib/gert_2.0.1.tar.gz' Content type 'application/octet-stream' length 122723 bytes (119 KB)

downloaded 119 KB

The downloaded source packages are in ‘/tmp/RtmpKQ7vP1/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done Warning message: In install.packages("gert") : installation of package ‘gert’ had non-zero exit status Hope the resolve,

Best, hanhuihong

honghh2018 commented 8 months ago

Had any advices for this issue ?

jeroen commented 8 months ago

One workaround is to use the binary package form p3m. For example like so:

install.packages('https://p3m.dev/cran/__linux__/centos7/latest/src/contrib/gert_2.0.1.tar.gz?r_version=4.2&arch=x86_64', repos = NULL)

If you really need to compile from source, try using the standard compiler. Temporarily set this in your ~/.R/Makevars file:

CC=/usr/bin/gcc

And then try reinstalling gert the normal way.

honghh2018 commented 8 months ago

Thanks, it work when i install teh p3m package install.packages('https://p3m.dev/cran/__linux__/centos7/latest/src/contrib/gert_2.0.1.tar.gz?r_version=4.2&arch=x86_64', repos = NULL)