on a fresh RStudio 4.1.0 instance
> install.packages('rstanarm')
Installing package into ‘/cloud/lib/x86_64-pc-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
trying URL 'http://package-proxy/focal/src/contrib/rstanarm_2.21.1.tar.gz'
Content type 'application/x-gzip' length 3541103 bytes (3.4 MB)
==================================================
downloaded 3.4 MB
* installing *source* package ‘rstanarm’ ...
** package ‘rstanarm’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
"/opt/R/4.1.0/lib/R/bin/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/lm.stan
Wrote C++ file "stan_files/lm.cc"
g++ -std=gnu++14 -I"/opt/R/4.1.0/lib/R/include" -DNDEBUG -I"../inst/include" -I"/cloud/lib/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -I'/cloud/lib/x86_64-pc-linux-gnu-library/4.1/StanHeaders/include' -I'/cloud/lib/x86_64-pc-linux-gnu-library/4.1/rstan/include' -I'/cloud/lib/x86_64-pc-linux-gnu-library/4.1/BH/include' -I'/cloud/lib/x86_64-pc-linux-gnu-library/4.1/Rcpp/include' -I'/cloud/lib/x86_64-pc-linux-gnu-library/4.1/RcppEigen/include' -I'/cloud/lib/x86_64-pc-linux-gnu-library/4.1/RcppParallel/include' -I/usr/local/include `"/opt/R/4.1.0/lib/R/bin/Rscript" -e "RcppParallel::CxxFlags()"` `"/opt/R/4.1.0/lib/R/bin/Rscript" -e "StanHeaders:::CxxFlags()"` -fpic -g -O2 -c stan_files/lm.cc -o stan_files/lm.o
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make: *** [/opt/R/4.1.0/lib/R/etc/Makeconf:175: stan_files/lm.o] Error 1
rm stan_files/lm.cc
ERROR: compilation failed for package ‘rstanarm’
* removing ‘/cloud/lib/x86_64-pc-linux-gnu-library/4.1/rstanarm’
Warning in install.packages :
installation of package ‘rstanarm’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpZRbEqS/downloaded_packages’
I suspect that gcc dies because it runs out of memory since rstanarm installation takes up quite a bit of memory and the RAM gauge in the top right maxes out right before the crash. is there any workaround for this that doesn't involve upgrading my cloud account?