stan-dev / rstanarm

rstanarm R package for Bayesian applied regression modeling
https://mc-stan.org/rstanarm
GNU General Public License v3.0
385 stars 132 forks source link

Error on require(rstanarm) in Ubuntu #559

Closed peterphalen closed 2 years ago

peterphalen commented 2 years ago

Summary:

In R, when I use the command require(rstanarm) in Ubuntu 20.04.3 LTS (or in 18.04), I get an error message and the package fails to load.

Description:

When I enter require(rstanarm) in R I get the following output.

Loading required package: rstanarm
Error: package or namespace load failed for ‘rstanarm’ in library.dynam(lib, package, package.lib):
 shared object ‘rstanarm.so’ not found
Warning message:
S3 methods ‘VarCorr.stanreg’, ‘as.array.stanreg’, ‘as.data.frame.stanreg’, ‘as.data.frame.summary.stanreg’, ‘as.matrix.stanreg’, ‘bayes_R2.stanreg’, ‘coef.stanmvreg’, ‘coef.stanreg’, ‘confint.stanreg’, ‘family.stanmvreg’, ‘family.stanreg’, ‘fitted.stanmvreg’, ‘fitted.stanreg’, ‘fixef.stanmvreg’, ‘fixef.stanreg’, ‘formula.stanmvreg’, ‘formula.stanreg’, ‘get_x.default’, ‘get_x.gamm4’, ‘get_x.lmerMod’, ‘get_x.stanmvreg’, ‘get_y.default’, ‘get_y.stanmvreg’, ‘get_z.lmerMod’, ‘get_z.stanmvreg’, ‘kfold.stanreg’, ‘launch_shinystan.stanreg’, ‘log_lik.stanjm’, ‘log_lik.stanmvreg’, ‘log_lik.stanreg’, ‘loo.stanreg’, ‘loo_R2.stanreg’, ‘loo_compare.stanreg’, ‘loo_compare.stanreg_list’, ‘loo_linpred.stanreg’, ‘loo_model_weights.stanreg_list’, ‘loo_predict.stanreg’, ‘loo_predictive_interval.stanreg’, ‘model.frame.stanmvreg’, ‘model.frame.stanreg’, ‘model.matrix.stanreg’, ‘names.stanreg_list’, ‘ngrps.stanmvreg’, ‘ngrps.stanreg’, ‘nobs.stanmvreg’, ‘nobs.stanreg’, ‘nsamples.stanreg’, ‘pairs.stanreg’, ‘plot.predict.stanjm’, ‘plot.stanreg’, ‘plot.survfit.stanjm’, ‘posterior_epred.stanreg’, ‘posterior_interval.stanreg’, ‘posterior_linpred.stanreg’, ‘posterior_predict.stanmvreg’, ‘posterior_predict.stanreg’, ‘posterior_vs_prior.stanreg’, ‘pp_check.stanreg’, ‘predict.stanreg’, ‘predictive_error.ppd’, ‘predictive_error.stanreg’, ‘predictive_interval.ppd’, ‘predictive_interval.stanreg’, ‘print.compare_rstanarm_loos’, ‘print.prior_summary.stanreg’, ‘print.stanmvreg’, ‘print.stanreg’, ‘print.stanreg_list’, ‘print.summary.stanmvreg’, ‘print.summary.stanreg’, ‘print.survfit.stanjm’, ‘prior_summary.stanreg’, ‘ranef.stanmvreg’, ‘ranef.stanreg’, ‘residuals.stanmvreg’, ‘residuals.stanreg’, ‘se.stanmvreg’, ‘se.stanreg’, ‘sigma.stanmvreg’, ‘sigma.stanreg’, ‘summary.stanmvreg’, ‘summary.stanreg’, ‘terms.stanmvreg’, ‘terms.stanreg’, ‘update.stanjm’, ‘update.stanmvreg’, ‘update.stanreg’, ‘vcov.stanreg’, ‘waic.stanreg’ were declared in NAMESPACE but not found 

RStanARM Version:

2.21.1

R Version:

3.6.3

Operating System:

Ubuntu 20.04.3 LTS (the identical error is produced when run in 18.04)

Session info:

> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 

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     

other attached packages:
[1] Rcpp_1.0.7

loaded via a namespace (and not attached):
 [1] splines_3.6.3        gtools_3.9.2         RcppParallel_5.1.4  
 [4] StanHeaders_2.21.0-7 threejs_0.3.1        shiny_1.7.1         
 [7] assertthat_0.2.1     stats4_3.6.3         yaml_2.2.1          
[10] pillar_1.6.4         lattice_0.20-45      glue_1.6.0          
[13] digest_0.6.29        promises_1.2.0.1     minqa_1.2.4         
[16] colorspace_2.0-2     htmltools_0.5.2      httpuv_1.6.4        
[19] Matrix_1.3-2         plyr_1.8.6           dygraphs_1.1.1.6    
[22] pkgconfig_2.0.3      rstan_2.21.3         purrr_0.3.4         
[25] xtable_1.8-4         scales_1.1.1         processx_3.5.2      
[28] later_1.3.0          lme4_1.1-27.1        tibble_3.1.6        
[31] bayesplot_1.8.1      generics_0.1.1       ggplot2_3.3.5       
[34] ellipsis_0.3.2       DT_0.20              shinyjs_2.1.0       
[37] cli_3.1.0            survival_3.2-13      magrittr_2.0.1      
[40] crayon_1.4.2         mime_0.12            ps_1.6.0            
[43] fansi_0.5.0          nlme_3.1-152         MASS_7.3-54         
[46] xts_0.12.1           pkgbuild_1.3.1       colourpicker_1.1.1  
[49] rsconnect_0.8.25     tools_3.6.3          loo_2.4.1           
[52] prettyunits_1.1.1    lifecycle_1.0.1      matrixStats_0.61.0  
[55] stringr_1.4.0        munsell_0.5.0        callr_3.7.0         
[58] compiler_3.6.3       rlang_0.4.12         nloptr_1.2.2.3      
[61] grid_3.6.3           ggridges_0.5.3       htmlwidgets_1.5.4   
[64] crosstalk_1.2.0      igraph_1.2.10        miniUI_0.1.1.1      
[67] base64enc_0.1-3      boot_1.3-28          gtable_0.3.0        
[70] codetools_0.2-18     inline_0.3.19        DBI_1.1.1           
[73] markdown_1.1         reshape2_1.4.4       R6_2.5.1            
[76] gridExtra_2.3        rstantools_2.1.1     zoo_1.8-9           
[79] dplyr_1.0.7          fastmap_1.1.0        utf8_1.2.2          
[82] shinystan_2.5.0      shinythemes_1.2.0    stringi_1.7.6       
[85] parallel_3.6.3       vctrs_0.3.8          tidyselect_1.1.1  
peterphalen commented 2 years ago

I guess this issue can be closed because I got the package loaded after trying many things followed by a nearly clean install of R. I apologize for not having a clearer explanation.