stan-dev / rstan

RStan, the R interface to Stan
https://mc-stan.org
1.04k stars 265 forks source link

Cannot install rstan 2.26.x from stan repo #1048

Closed skaputa closed 1 year ago

skaputa commented 1 year ago

Summary:

We are having issues installing rstan 2.26.x from the Stan R package repository. The installation defaults to the 2.21 version, which doesn’t work with R 4.2. See below.

Description:

https://mc-stan.org/r-packages/src/contrib appears to return a 404 file not found error

Reproducible Steps:

install.packages("rstan", repos = c("https://mc-stan.org/r-packages/", getOption("repos"))) Installing package into ‘C:/Users/kaput001/AppData/Local/R/win-library/4.2’ (as ‘lib’ is unspecified) Warning: 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' also installing the dependency ‘StanHeaders’

Warning: unable to access index for repository https://mc-stan.org/r-packages/bin/windows/contrib/4.2: cannot open URL 'https://mc-stan.org/r-packages/bin/windows/contrib/4.2/PACKAGES' trying URL 'http://mirror1.csvd.census.gov/CRAN/bin/windows/contrib/4.2/StanHeaders_2.21.0-7.zip' Content type 'application/zip' length 2175373 bytes (2.1 MB) downloaded 2.1 MB

trying URL 'http://mirror1.csvd.census.gov/CRAN/bin/windows/contrib/4.2/rstan_2.21.8.zip' Content type 'application/zip' length 3343804 bytes (3.2 MB) downloaded 3.2 MB

package ‘StanHeaders’ successfully unpacked and MD5 sums checked package ‘rstan’ successfully unpacked and MD5 sums checked

R Version:

R 4.2.1

Operating System:

Windows 10 Enterprise

andrjohns commented 1 year ago

Is this on a corporate computer/network? It looks like your access to some network resources from R is restricted.

Instead, you could download the latest binaries from the repository and install them manually yourself

skaputa commented 1 year ago

Yes this is on a cooperate computer network. Running install.packages("rstan", repos = c("https://mc-stan.org/r-packages/", getOption("repos"))) has previously worked. So I was not sure if the connection issue was on our end or the repository end.

Installing the latest binaries manually solved the issue.