Cannot install Rstan

Hellos to al fellows,

I am trying to install rstan from the Github Stan help source:

Last week I sucessfully installed it. but today I receive always thsi error:

Error: cannot allocate vector of size 12050.6 Gb
In addition: Warning message:
In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
‘-E’ not found

I removed rstan and install it agin but does not work. Also I upgrated my R and Rstudio and Rtools however still i am receiving the smae error. I ahve no idea what should i do more.

Please help me to install the rstan.

1 Like

this is an evergreen question - discourse search on “cannot allocate vector” turns up this: Error: cannot allocate vector of size 17348.7 Gb - #7 by RR_Stan

good luck.

1 Like

This error normally occurs when you have run models under R3.6, and then upgraded to R4.0 and are trying to run them again. To fix this, you need to remove any pre-compiled models by deleting the .rds files in the directory and starting in a clean R session

Dear Andrew,

Many thanks for your helpful advice. I did the advice and was work to my issue. regarding the .rds files, i am not sure if I should all the .rds file from R directory or just from the directory that my codes are there?