Having an issue many of us seems to have had, but can't fix it so far.
I can't install any package in R (through RStudio), beeing from any url (tried different repositories : Global or France - Lyon 1 repository) or from a downloaded tar.gz.
This is what I get if I try to install from an url :
I'm using R version 4.4.1 and RStudio 2024.04.2-764
I'm using my office's network, which is a mess of proxies, firewalls, on a computer with restrictions from the admin (I managed to install R and RStudio without beeing stopped by a request for an admin password, surprisingly)
Yes I have access to the url from my web browser, and I can download .tar.gz packages from there.
I tried with ETH Zurich server and got the following error message after several minutes :
> install.packages("data.table")
Warning in install.packages :
unable to access index for repository http://stat.ethz.ch/CRAN/src/contrib:
cannot open URL 'http://stat.ethz.ch/CRAN/src/contrib/PACKAGES'
Warning in install.packages :
package ‘data.table’ 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 http://stat.ethz.ch/CRAN/bin/windows/contrib/4.4:
cannot open URL 'http://stat.ethz.ch/CRAN/bin/windows/contrib/4.4/PACKAGES'
Oh, I saw on another topic on this forum that unchecking "Use secure download method for HTTP" in the "package" section in my "Global Options" might solve the problem. That's probably the reason ?
I tried your link directly in the R console, it gives me the same output. I think it's a connexion/firewall/something like this issue
> download.file("https://cran.rstudio.com/src/contrib/PACKAGES.gz", tempfile())
trying URL 'https://cran.rstudio.com/src/contrib/PACKAGES.gz'
Error in download.file("https://cran.rstudio.com/src/contrib/PACKAGES.gz", :
cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES.gz'
In addition: Warning message:
In download.file("https://cran.rstudio.com/src/contrib/PACKAGES.gz", :
URL 'https://cran.rstudio.com/src/contrib/PACKAGES.gz': Timeout of 60 seconds was reached