SSL Connect Error with Latest RStudio

I'm getting an SSL connect error after downloading the latest RStudio. I ended up updating everything else in case that was the issue but that didn't change anything. I eventually figured out that turning off the secure download method for packages (under tools -> global options -> packages) fixes it, but that doesn't seem like a long-term solution.
This error has popped up when I open R and then when I try to install or load many packages, but for some reason not all packages. I have included examples, but I don't know that this is reproducible.

install.packages("rcompanion")
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.6/rcompanion_2.5.2.zip'
Error in download.file(urls, destfiles, "libcurl", mode = "wb", ...) :
cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/4.6/rcompanion_2.5.2.zip'
In addition:
Warning message:
In download.file(urls, destfiles, "libcurl", mode = "wb", ...) :
URL 'https://cran.rstudio.com/bin/windows/contrib/4.6/rcompanion_2.5.2.zip': status was 'SSL connect error'
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘rcompanion’ failed

1 Like