R - when trying to install package: InternetOpenUrl failed R - when trying to install package: InternetOpenUrl failed r r

R - when trying to install package: InternetOpenUrl failed


The problem might be a failure to handle https properly by the underlying method used by R for downloading files. This can be verified by trying

fname <- tempfile()download.file("https://cran.uni-muenster.de/", destfile=fname)file.remove(fname)

If that does not work but replacing https with http does, this most likely means that the method used by R's download.file cannot deal with https at all or fails verifying SSL certificates.

You can try

  • using regular http mirrors instead of https
  • update your CA certificate bundle to allow proper certificate validation
  • setting the default download method to "libcurl" and see if that helps:

    options(download.file.method="libcurl")


IE 10 --> uncheck File-->Work Offline option.IE 11 --> click on "Working Offline" in the Status Bar and it will change to "Working Online".


I faced a similar problem while installing R packages on win8.It may happen that your "Internet Explorer" browser has connection problems. Change your default browser to "Internet Explorer" and make sure the browser handles http queries without any issues.