I have the same problem. I want to install ‘rstanarm’ on windows with these commands:
- 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
- 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.