Trouble installing CMDstanR on Mac: is not available for this version of R

Hi all,

I am having issues installing CMDstanR package. Error code:

> install.packages("cmdstanr", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
Warning in install.packages :
  unable to access index for repository https://mc-stan.org/r-packages/src/contrib:
  cannot open URL 'https://mc-stan.org/r-packages/src/contrib/PACKAGES'
Warning in install.packages :
  package ‘cmdstanr’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Warning in install.packages :
  unable to access index for repository https://mc-stan.org/r-packages/bin/macosx/contrib/4.1:
  cannot open URL 'https://mc-stan.org/r-packages/bin/macosx/contrib/4.1/PACKAGES'

Im running a Macbook Pro 2011 on HighSierra and I just freshly installed R and R studio using homebrew. Followed these steps and these when the error occurred. Do you know how to fix this?

I would greatly appreciate your help.

1 Like

Can you try to install the github version:

# install.packages("remotes")
remotes::install_github("stan-dev/cmdstanr")
4 Likes

Brilliant! Thanks a lot.

This worked for me too , thanks a ton

Wow! Third person helped. Working on Richard McElreath’s 2020 Statistical Rethinking and could not get his package installed. R Installation and Administration was of no help. (I’ve been out of programming for 40 years. It’s amazing to have a help desk [Google search] so close at hand!)

Thank you, @andrjohns!