0

A similar question was asked here, but I tried the code Tiago Lubiana posts there, to no avail.

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

I did install rstan by running

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

When I want to install rstanarm, nothing seems to work, though. 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 solved the problem (but see here for a similar error with another package).

2) 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 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

3) Following this post 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 (as suggested here), etc... but nothing has worked. I really feel hopeless at this point.

I have R version 3.5.2, rstan version 2.19.2, and 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
  • 113
  • 6
  • My guess would be that your machine is running out of RAM. If so, you might try just using one or two cores by doing `export MAKEFLAGS=-j1` before starting R from a shell. – Ben Goodrich Dec 27 '19 at 03:33
  • I did that, but it didn't work, unfortunately. – Nalerive Dec 27 '19 at 14:37

0 Answers0