22

Since I've updated both R (to 3.2.2) and RStudio (to 0.99.486) in Win 7, I'm experiencing problems downloading packages.

I'm aware of the questions asked here but neither

setInternet2(TRUE)

nor changing the CRAN mirror helped. The "Tools -> Global Options -> Packages -> "Use Internet Explorer library/proxy for HTTP" was also already unchecked and I made sure that my Firefox uses no proxy.

I tried

setRepositories()

as well as manually installing the package with

install.packages('dplyr', repos='https://cran.uni-muenster.de/')

but I still get the message:

Warning in install.packages :
  InternetOpenUrl failed: 'Der Servername oder die Serveradresse konnte nicht verarbeitet werden.'
Warning in install.packages :
  InternetOpenUrl failed: 'Der Servername oder die Serveradresse konnte nicht verarbeitet werden.'
Warning in install.packages :
  unable to access index for repository https://R-Forge.R-project.org/src/contrib
Warning in install.packages :
  InternetOpenUrl failed: 'Der Servername oder die Serveradresse konnte nicht verarbeitet werden.'
Warning in install.packages :
  InternetOpenUrl failed: 'Der Servername oder die Serveradresse konnte nicht verarbeitet werden.'
Warning in install.packages :
  unable to access index for repository https://cran.uni-muenster.de/src/contrib
Installing package into ‘C:/Users/me/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
  InternetOpenUrl failed: 'Der Servername oder die Serveradresse konnte nicht verarbeitet werden.'
Warning in install.packages :
  InternetOpenUrl failed: 'Der Servername oder die Serveradresse konnte nicht verarbeitet werden.'
Warning in install.packages :
  unable to access index for repository https://cran.uni-muenster.de/src/contrib
Warning in install.packages :
  package ‘dplyr’ is not available (for R version 3.2.2)
Warning in install.packages :
  InternetOpenUrl failed: 'Der Servername oder die Serveradresse konnte nicht verarbeitet werden.'
Warning in install.packages :
  InternetOpenUrl failed: 'Der Servername oder die Serveradresse konnte nicht verarbeitet werden.'
Warning in install.packages :
  unable to access index for repository https://cran.uni-muenster.de/bin/windows/contrib/3.2

Could anyone please help? Thank you!

Community
  • 1
  • 1
evoked_potential
  • 323
  • 1
  • 2
  • 5

5 Answers5

43

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")
    
omahdi
  • 630
  • 8
  • 9
1

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

Vyacheslav
  • 11
  • 1
0

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.

0

I faced a similar problem.

The issue was that the default CRAN server was down temporarily, which is rather unusual!

Worked around the issue by finding a nearby CRAN mirror, then updating the defaults:

options(repos = c(CRAN = "https://cran.ma.imperial.ac.uk/", 
                  CRANextra = "https://mirrors.ebi.ac.uk/CRAN/"))

Then this worked fine:

install.packages("ggplot2")
Contango
  • 76,540
  • 58
  • 260
  • 305
0

I get a similar problem while I install a program by using winget. The problem was that the website of installer was blocked by my internet provider. I use vpn in order to solve this issue. As a result: If you cannot reach a website, use VPN at first to see if this website is blocked somehow or it does/doesn't exist.

NJT145
  • 3
  • 2