Rstan fails to install on compute canada

Hi I am trying to run a rstan model on compute Canada, but when I am trying to install rstan package I get the following error:

1: In install.packages(c(“StanHeaders”, “rstan”), type = “source”) :
installation of package ‘BH’ had non-zero exit status
2: In install.packages(c(“StanHeaders”, “rstan”), type = “source”) :
installation of package ‘rstan’ had non-zero exit status

I have tried different methods to install the package like:

install.packages("rstan", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))

install.packages(c(“StanHeaders”,“rstan”),type=“source”)

but all of them failed. I would really appreciate your help as my system is unable to run multiple chains and I need these cloud resources to handle my model.

The error indicates that the issue is with the BH package, not rstan:

installation of package ‘BH’ had non-zero exit status

What output do you get if you try to install BH?

1 Like

Thanks for the reply. It was actually an error on my side that did not allow BH to install. All good now. Thanks!

1 Like