Rstanarm installation failure on R 3.6.2, Debian 9

Hi,

I am trying to install rstanarm, with the following command:

install.packages("rstanarm")

The installation command results in the following error:

** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘rstanarm’ in dyn.load(file, DLLpath = DLLpath, …):
unable to load shared object ‘/usr/local/lib/R/site-library/00LOCK-rstanarm/00new/rstanarm/libs/rstanarm.so’:
/usr/local/lib/R/site-library/00LOCK-rstanarm/00new/rstanarm/libs/rstanarm.so: undefined symbol: _ZN21model_count_namespace24csr_matrix_times_vector2IddEEN5Eigen6MatrixIN5boost4math5tools12promote_argsIT_T0_ffffE4typeELin1ELi1ELi0ELin1ELi1EEERKiSD_RKNS2_IS7_Lin1ELi1ELi0ELin1ELi1EEERKSt6vectorIiSaIiEESL_RKNS2_IS8_Lin1ELi1ELi0ELin1ELi1EEEPSo
Error: loading failed
Execution halted
ERROR: loading failed

Can someone give me pointer on how to resolve this please.

> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)

Matrix products: default
BLAS:   /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.19.so

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_3.6.2 tools_3.6.2
1 Like

The same error can be reproduced on rocker/tidyverse Docker image with the following command:

docker run rocker/tidyverse:latest bash -c "install2.r rstanarm"

The rstanarm package on CRAN won’t build and I can’t upload a rstanarm that does build because it appears to crash on 32bit Windows when quitting R. You can do

remotes::install_github("stan-dev/rstanarm")

@Takao_Noguchi I’ve run into the same problem installing rstanarm to RHEL 7.3:

Error: package or namespace load failed for ‘rstanarm’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '~/rpackages/rstanarm/libs/rstanarm.so':
  ~/rpackages/rstanarm/libs/rstanarm.so: undefined symbol: _ZN21model_count_namespace24csr_matrix_times_vector2IddEEN5Eigen6MatrixIN5boost4math5tools12promote_argsIT_T0_ffffE4typeELin1ELi1ELi0ELin1ELi1EEERKiSD_RKNS2_IS7_Lin1ELi1ELi0ELin1ELi1EEERKSt6vectorIiSaIiEESL_RKNS2_IS8_Lin1ELi1ELi0ELin1ELi1EEEPSo
Error: loading failed
Execution halted
ERROR: loading failed
> sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux

Matrix products: default
BLAS: /rigel/opt/R-3.5.3/lib64/R/lib/libRblas.so
LAPACK: /rigel/opt/R-3.5.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_3.5.3

It applies to all source installs of rstanarm from CRAN irrespective of operating system. Installation of binary packages or source installation from github should be fine.

Thanks! That command worked.

Thanks @bgoodri, that works for me too.