[R] update.packages through proxy failing

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Wed Jan 8 09:04:05 CET 2003


On Wed, 8 Jan 2003, Duncan Mackay wrote:

> my uni has recently switched to using a proxy (with password) for accessing
> Web pages outside the uni. I have since found that "update packages" etc no
> longer seem to work from R.
>
> I have tried to fix this problem in two ways:-
>
> 1) renaming internet2.dll to internet.dll in the "Modeules" folder and
> proceeding as usual. When I tried "update packages" from the menu in R, I
> got an "Rgui.exe has prodeced errors and is generating an error log" message
> and crash.

No wonder.  Try looking *carefully* at the CHANGES file, undoing the
criminal damage you caused and using the --internet2.dll flag.

Or just read ?download.file (linked from ?update.packages).

> 2) I used the following code
>
>  print(Sys.putenv("HTTP_PROXY"="http://www.flinders.edu.au/proxy.pac/",
> password="mypassword"))
> [1] TRUE TRUE
> > Sys.getenv("HTTP_PROXY")
>                              HTTP_PROXY
> "http://www.flinders.edu.au/proxy.pac/"
> > update.packages()
> trying URL `http://cran.r-project.org/bin/windows/contrib/PACKAGES'
> unable to connect to 'cran.r-project.org'.
> Error in download.file(url = paste(contriburl, "PACKAGES", sep = "/"),  :
>         cannot open URL
> `http://cran.r-project.org/bin/windows/contrib/PACKAGES'

You've already damaged your system, *and* the help page says you cannot
set the variables that way!  And it also says that is not the format for
proxies.

> Any help gratefully appreciated,

Read and follow the instructions?  I do suggest you reinstall R, then
use the --internet2 flag *as documented*.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list