[R] proxy setting RedHat Linux

Martyn Plummer plummer at iarc.fr
Thu Feb 20 10:36:03 CET 2003

On Thu, 2003-02-20 at 02:48, Jonathan Q. Li wrote:
> Hi,
> I was trying to update packages with my R 1.6 under RedHat 8.0 system.
> When entering this command,
>  > update.packages()
> It simply says,
>     trying URL `http://cran.r-project.org/src/contrib/PACKAGES'
> But nothing happens.
> Is this a problem with my proxy setting since I am working behind a 
> firewall? It seems so:
>  > Sys.getenv("http_proxy")
> http_proxy
>         ""
> Then the documentation in "download.file" says that Sys.putenv won't 
> work in setting the proxy. It says " These environment variables must be 
> set before the download code
>      is first used: they cannot be altered later by calling
>      `Sys.putenv'.".
> I don't understand what this means: "set it before the download code is 
> first used". I have installed the R 1.6 simply from  RPM in CRAN.

Try setting the environment variables on the command line before you
launch R, e.g.

export http_proxy="http://proxy.domain.com/"

If this works, then you should put this line in your profile
( ~/.bash_profile ) or create a new file - say "R.sh" in the directory
/etc/profile.d containing the same line. This will ensure that the
environment variables are set every time you log on.


More information about the R-help mailing list