# Unable to install rstanarm both with reference to Survival and without any reference

**URL:** <https://discourse.mc-stan.org/t/unable-to-install-rstanarm-both-with-reference-to-survival-and-without-any-reference/16125>\
**Category:** rstanarm\
**Tags:** rstan\
**Created:** [June 20, 2020, 5:45pm UTC](https://discourse.mc-stan.org/t/unable-to-install-rstanarm-both-with-reference-to-survival-and-without-any-reference/16125 "2020-06-20T17:45:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaryBo](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/marybo/32/8412_2.png) [@MaryBo](https://discourse.mc-stan.org/u/MaryBo)\
**Post date:** [June 20, 2020, 5:45pm UTC](https://discourse.mc-stan.org/t/unable-to-install-rstanarm-both-with-reference-to-survival-and-without-any-reference/16125/1 "2020-06-20T17:45:39Z")

</div>

Hi everybody,

I have the same problem. I want to install ‘rstanarm’ on windows with these commands:

1. devtools::install\_github(“stan-dev/rstanarm”,ref = “feature/survival”, build\_vignettes = FALSE)

It installed after uninstalling and re-installing many other packages like ‘glue’, ‘ps’, etc. But did not have ‘stan\_surv’ function in the end.  
There was a warning too:

```
Warning message:
In utils::untar(tarfile, ...) :
  ‘tar.exe -xf "C:\Users\z3529455\AppData\Local\Temp\RtmpstuJZu\file755416331bd.tar.gz" -C "C:/Users/z3529455/AppData/Local/Temp/RtmpstuJZu/remotes75543a041272"’ returned error code 1

```

1. devtools::install\_github(“stan-dev/rstanarm”, build\_vignettes = FALSE)

did not install with this error: installation of package ‘rstanarm’ had non-zero exit status.  
Here is the error:

```
Error: Failed to install 'rstanarm' from GitHub:
  (converted from warning) installation of package ‘C:/Users/z3529455/AppData/Local/Temp/RtmpstuJZu/file75541be324a9/rstanarm_2.19.1.tar.gz’ had non-zero exit status
In addition: Warning message:
In utils::untar(tarfile, ...) :
  ‘tar.exe -xf "C:\Users\z3529455\AppData\Local\Temp\RtmpstuJZu\file7554777d77a3.tar.gz" -C "C:/Users/z3529455/AppData/Local/Temp/RtmpstuJZu/remotes7554f9c35f"’ returned error code 1

```

Then, I decided to update my R and Rtools version to see it makes anything better; however, again I got errors which were related to memory. that is:

```
cc1plus.exe: out of memory allocating 5401568 bytes
make: *** [C:/Users/z3529455/DOCUME~1/R/R-40~1.1/etc/i386/Makeconf:227: stan_files/jm.o] Error 1
rm stan_files/jm.cc stan_files/binomial.cc stan_files/lm.cc stan_files/continuous.cc stan_files/bernoulli.cc stan_files/polr.cc stan_files/surv.cc stan_files/count.cc stan_files/mvmer.cc
ERROR: compilation failed for package 'rstanarm'
* removing 'C:/Users/z3529455/Documents/R/R-4.0.1/library/rstanarm'
Error: Failed to install 'rstanarm' from GitHub:
  (converted from warning) installation of package ‘C:/Users/z3529455/AppData/Local/Temp/Rtmpg3xybY/file6cc4199c7231/rstanarm_2.19.1.tar.gz’ had non-zero exit status
In addition: Warning message:
In utils::untar(tarfile, ...) :
  ‘tar.exe -xf "C:\Users\z3529455\AppData\Local\Temp\Rtmpg3xybY\file6cc445597d5d.tar.gz" -C "C:/Users/z3529455/AppData/Local/Temp/Rtmpg3xybY/remotes6cc4cbd2c7c"’ returned error code 1

```

I even tried the advice of @andrjohns which is:

```
Sys.setenv(MAKEFLAGS="-j2")
devtools::install_github("stan-dev/rstanarm",ref = "feature/survival", build_vignettes = FALSE)

```

Unfortunately, I get memory errors again.

I would highly appreciate it if someone can help me resolve this issue.

---

<div class="post-metadata">

**Author:** ![jonah](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jonah/32/200_2.png) [@jonah](https://discourse.mc-stan.org/u/jonah)\
**Post date:** [June 24, 2020, 2:46pm UTC](https://discourse.mc-stan.org/t/unable-to-install-rstanarm-both-with-reference-to-survival-and-without-any-reference/16125/2 "2020-06-24T14:46:16Z")

</div>

Sorry you’re having trouble installing this and sorry no one responded here yet. Do you know how much RAM your computer has?

> [@MaryBo](#):
>
> `Sys.setenv(MAKEFLAGS="-j2")`

What about with `"-j1"` instead of `"-j2"`? It will probably still error, but worth checking.

@bgoodri There have been a lot of people reporting that they can’t install the “feature/survival” branch on Windows. Do you know of anything we can do about this? I know it takes a lot of RAM but does it really take so much that even with 32gb of RAM (as reported [here](https://discourse.mc-stan.org/t/rstanarm-cran-vs-development-version-installation-issues/14399/25)) it can’t be compiled? Is there potentially something else going on besides the RAM issue?

---

<div class="post-metadata">

**Author:** ![bgoodri](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bgoodri/32/4451_2.png) [@bgoodri](https://discourse.mc-stan.org/u/bgoodri)\
**Post date:** [June 25, 2020, 11:34pm UTC](https://discourse.mc-stan.org/t/unable-to-install-rstanarm-both-with-reference-to-survival-and-without-any-reference/16125/3 "2020-06-25T23:34:25Z")

</div>

The 32 bitness restriction on the address space.

---

<div class="post-metadata">

**Author:** ![MaryBo](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/marybo/32/8412_2.png) [@MaryBo](https://discourse.mc-stan.org/u/MaryBo)\
**Post date:** [June 26, 2020, 6:29am UTC](https://discourse.mc-stan.org/t/unable-to-install-rstanarm-both-with-reference-to-survival-and-without-any-reference/16125/4 "2020-06-26T06:29:20Z")

</div>

> [@MaryBo](#):
>
> devtools::install\_github(“stan-dev/rstanarm”,ref = “feature/survival”, build\_vignettes = FALSE)

Hi @jonah,

Thank you for your reply.  
I tried installing with the new setting you mentioned. It did not install again…
