如何在R(ubuntu)中设置代理

时间:2013-03-17 15:33:21

标签: r ubuntu proxy cran bioconductor

Gaurav Pandey

我使用了命令

Sys.setenv(http_proxy="http://myusername:pswd@host:port")

起初它起作用了。 但是在终端重新启动它时会显示以下错误.-

 cannot open: HTTP status was '407 Proxy Authentication Required

如何解决此问题。帮助,,,

1 个答案:

答案 0 :(得分:4)

为运行R的进程设置环境。当R的实例退出时,进程消失,环境消失。

您无法为父进程设置环境。

将这些命令改为/etc/profile~/.bash_profile

export http_proxy
http_proxy=http://myusername:pswd@host:port

或全部在一行(bash):

export http_proxy=http://myusername:pswd@host:port

或者在开始R之前在shell中运行命令。