stan-dev / stan-dev/rstanarm

Cannot install rstanarm (R crashes)

Open
#408 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
401
Forks
136
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported install and library-loading failures with R 3.5.2 on the stated Debian-based Linux environment, using the commands and paths in the issue. Inspect the installation output and crash details before deciding whether the problem is specific to rstanarm, its compiled shared object, or the local R setup. Done means identifying a reproducible cause and confirming that rstanarm installs and loads successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
debian, linux, r
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.