rstanarm icon indicating copy to clipboard operation
rstanarm copied to clipboard

Cannot install rstanarm (R crashes)

Open nalerive opened this issue 6 years ago • 1 comments

Summary:

I haven't been able to install rstanarm after several attempts. R keeps crashing during installation.

Description and reproducible examples

I managed to install rstan by running

install.packages("rstan", repos = "https://cloud.r-project.org/", dependencies = TRUE)

When I want to install rstanarm, everything out there seems to fail. I've tried the following:

  1. install.packages("rstanarm"): R crashes and installs a folder called 00LOCK-rstanarm, plus the corresponding rstanarm folder. When I open R, rstanarm is there, but after running library(rstanarm), I get

Error: package or namespace load failed for ‘rstanarm’ in library.dynam(lib, package, package.lib): shared object ‘rstanarm.so’ not found

By running install.packages("rstanarm") again, I get:

ERROR: failed to lock directory ‘/home/nalerive/R/x86_64-pc-linux-gnu-library/3.5’ for modifying Try removing ‘/home/nalerive/R/x86_64-pc-linux-gnu-library/3.5/00LOCK-rstanarm’ Warning in install.packages : installation of package ‘rstanarm’ had non-zero exit status

Deleting that folder has not helped so far.

  1. From here, running if (!require(devtools)) { install.packages("devtools") library(devtools) } install_github("stan-dev/rstanarm", build_vignettes = FALSE)

leads to R crashing again, and the same folders as in 1) are installed. I also get the same error as in 1) by running library("rstanarm"), namely :

Error: package or namespace load failed for ‘rstanarm’ in library.dynam(lib, package, package.lib): shared object ‘rstanarm.so’ not found

  1. From here, I tried:

install.packages("rstanarm", dependencies = TRUE, repos="http://cran.rstudio.com/", INSTALL_opts = c('--no-lock'))

and R keeps crashing.

I've tried more things, like removing the 00LOCK-rstanarm folder by means of unlink("/home/nalerive/R/x86_64-pc-linux-gnu-library/3.5/00LOCK-rstanarm/", recursive = TRUE); restarting R when indicated; checking my C++ toolchain, etc... nothing has worked, and I feel hopeless at this point.

RStanARM Version:

Curiously, after running packageVersion("rstanarm") I get

[1] ‘2.19.3’

but cannot load it.

As for rstan, it is version

[1] ‘2.19.2’

R Version:

[1] ‘3.5.2’

Operating System:

Linux 4.15.0-1-amd64 #1 SMP Debian 4.15.4-1~mx17+1 (2018-02-23)

Any help will be highly appreciated! Thanks in advance

nalerive avatar Dec 26 '19 18:12 nalerive

Having exactly the same issue on Ubuntu:

OS:

#28~18.04.1-Ubuntu SMP Wed Dec 18 16:40:14 UTC 2019

gtm19 avatar Jan 25 '20 17:01 gtm19