Liviu Andronic
2007-Oct-16 13:41 UTC
[R] R-2.6.0 - packages installation through a proxy - not working
Hello everyone, I run R on Gentoo Linux and this week I upgraded R from 2.5.0 to 2.6.0. With the new build, I have stumbled upon an unpleasant problem: I can no longer install packages from CRAN through a transparent proxy. With the previous version, I simply added to /usr/lib/R/etc/Renviron the following line and it functioned like a charm: ## Proxy settings http_proxy="SERVER:3128" With 2.6.0, however, R refuses to connect to the CRAN mirror. I have added to the new Renviron even more lines (useless, probably). Now the Proxy settings look like this: ## Proxy settings http_proxy="SERVER:3128" https_proxy="SERVER:3128" ftp_proxy="SERVER:3128" I also tried - with no luck - to use the following command at the start of the R session: Sys.setenv(http_proxy="SERVER:3128") I get the following error message:> install.packages("Rcmdr", dependencies=TRUE)--- Please select a CRAN mirror for use in this session --- Error in open.connection(file, "r") : unable to open connection In addition: Warning message: In open.connection(file, "r") : unable to connect to 'cran.r-project.org' on port 80. Loading Tcl/Tk interface ... done Warning: unable to access index for repository http://cran.stat.unipd.it/src/contrib Warning message: In install.packages("Rcmdr", dependencies = TRUE) : package 'Rcmdr' is not available So, is this a bug in R-2.6.0 or did anything change in the way these settings are handled? Regards, Liviu
Rainer M. Krug
2007-Oct-16 14:02 UTC
[R] R-2.6.0 - packages installation through a proxy - not working
Liviu Andronic wrote:> Hello everyone, > > I run R on Gentoo Linux and this week I upgraded R from 2.5.0 to > 2.6.0. With the new build, I have stumbled upon an unpleasant problem: > I can no longer install packages from CRAN through a transparent > proxy. With the previous version, I simply added toI always change the variables in the terminal window before I start R, i.e. export http_proxy=SERVER:3128 export ftp_proxy=SERVER:3128 and then start R - I did it this morning, and it worked.> /usr/lib/R/etc/Renviron the following line and it functioned like a > charm: > ## Proxy settings > http_proxy="SERVER:3128" > > With 2.6.0, however, R refuses to connect to the CRAN mirror. I have > added to the new Renviron even more lines (useless, probably). Now the > Proxy settings look like this: > ## Proxy settings > http_proxy="SERVER:3128" > https_proxy="SERVER:3128" > ftp_proxy="SERVER:3128" > > I also tried - with no luck - to use the following command at the > start of the R session: > Sys.setenv(http_proxy="SERVER:3128") > > I get the following error message: >> install.packages("Rcmdr", dependencies=TRUE) > --- Please select a CRAN mirror for use in this session --- > Error in open.connection(file, "r") : unable to open connection > In addition: Warning message: > In open.connection(file, "r") : > unable to connect to 'cran.r-project.org' on port 80. > Loading Tcl/Tk interface ... done > Warning: unable to access index for repository > http://cran.stat.unipd.it/src/contrib > Warning message: > In install.packages("Rcmdr", dependencies = TRUE) : > package 'Rcmdr' is not available > > > So, is this a bug in R-2.6.0 or did anything change in the way these > settings are handled? > > Regards, > Liviu > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- NEW EMAIL ADDRESS AND ADDRESS: Rainer.Krug at uct.ac.za RKrug at sun.ac.za WILL BE DISCONTINUED END OF MARCH Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Plant Conservation Unit Department of Botany University of Cape Town Rondebosch 7701 South Africa Tel: +27 - (0)21 650 5776 (w) Fax: +27 - (0)86 516 2782 Fax: +27 - (0)21 650 2440 (w) Cell: +27 - (0)83 9479 042 Skype: RMkrug email: Rainer.Krug at uct.ac.za Rainer at krugs.de
Liviu Andronic
2007-Oct-16 14:32 UTC
[R] R-2.6.0 - packages installation through a proxy - not working
On 10/16/07, Rainer M. Krug <Rainer at krugs.de> wrote:> I always change the variables in the terminal window before I start R, i.e. > > export http_proxy=SERVER:3128 > export ftp_proxy=SERVER:3128 > > and then start R - I did it this morning, and it worked.I always start up Gentoo with these variables set system wide: localhost m1_1sem # env | grep -i proxy http_proxy=SERVER:3128 ftp_proxy=SERVER:3128 rsync_proxy=SERVER:3128 https_proxy=SERVER:3128 However, R seems to ignore them. I always had to put the necessary variables in Renviron. I have just tried your method, but it also failed. I double-checked the proxy server name, so I doubt the problem is there. There must be something else that blocks R from accessing the Internet. Regards, Liviu
Liviu Andronic
2007-Oct-17 17:24 UTC
[R] R-2.6.0 - packages installation through a proxy - not working
On 10/17/07, Dirk Eddelbuettel <edd at debian.org> wrote:> Hmm, I haven't had to do that in a while. What happens if you do > > > update.packages(method="wget") > > ie use an explicit setting of method?This exact way of manually specifying the method within the command (as opposed to setting it in Rprofile.site) is working. I used it successfully with install. and update.packages(). Liviu