setInternet2 cannot connect windows

2019-08-07 01:47发布

问题:

At work I usually have to set the setInternet2(use=TRUE) option in order to access cran for updating packages etc.. However after they updated win explorer to version 8 this doesnt seem to work anylonger. This is the output after trying to install e1071 both with and without the setInternet2 option invoked.

Any ideas if this can be remedied?

> install.packages("e1071")
Installing package(s) into ‘P:/R prg/R-2.13.1/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to connect to 'cran.ma.imperial.ac.uk' on port 80.
Warning in install.packages :
  unable to connect to 'cran.ma.imperial.ac.uk' on port 80.
Warning in install.packages :
  unable to access index for repository http://cran.ma.imperial.ac.uk/bin/windows/contrib/2.13
Warning in install.packages :
  unable to connect to 'www.stats.ox.ac.uk' on port 80.
Warning in install.packages :
  unable to connect to 'www.stats.ox.ac.uk' on port 80.
Warning in install.packages :
  unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.13
Warning in install.packages :
  package ‘e1071’ is not available (for R version 2.13.1)

> setInternet2(use=TRUE)
> install.packages("e1071")
Installing package(s) into ‘P:/R prg/R-2.13.1/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
  InternetOpenUrl failed: 'A connection with the server could not be established'
Warning in install.packages :
  InternetOpenUrl failed: 'A connection with the server could not be established'
Warning in install.packages :
  unable to access index for repository http://cran.ma.imperial.ac.uk/bin/windows/contrib/2.13
Warning in install.packages :
  InternetOpenUrl failed: 'A connection with the server could not be established'
Warning in install.packages :
  InternetOpenUrl failed: 'A connection with the server could not be established'
Warning in install.packages :
  unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.13

Warning in install.packages :
  package ‘e1071’ is not available (for R version 2.13.1)

回答1:

Speak with your network admins. Get them to check that IE8's connection settings are configured properly. It's also possible that they are blocking some kinds of traffic whatever port is the default for IE8 to use at your workplace.