Windows上的RStudio代理配置 [英] RStudio Proxy Configuration on Windows

查看:456
本文介绍了Windows上的RStudio代理配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已在以下位置询问此问题:在Rstudio上配置代理.但是,它从未得到解决.

This question has been asked in: Configure proxy on Rstudio. However, it was never resolved.

我是RStudio 0.99.486版本和R 3.2.2版本的用户.阅读一些建议后,我尝试了两种在办公室中配置代理服务器设置的方法,但均未成功:

I am a user of RStudio 0.99.486 version and R 3.2.2 version. I have tried 2 ways to configure proxy settings in the office without success after reading several suggestions:

第一次尝试: 输入Rstudio作为第一行: Sys.setenv(http_proxy ="http://user_name:password@proxy.company_domain.es:8080/")

FIRST TRY: Type in Rstudio as first line: Sys.setenv(http_proxy="http://user_name:password@proxy.company_domain.es:8080/")

转到: -工具,-全局选项,-软件包和取消标记选项:

Go to: -Tools, -Global Options, -Packages, and unmark option:

将Internet库/代理用于HTTP"

"Use internet library/proxy for HTTP"

我也未标记选项:对HTTP使用安全下载方法".

I also unmarked the option: "Use secure download method for HTTP".

此外,我右键单击桌面的R x64 3.2.2图标,并在目标"阵营中添加了1个空格:

Besides, I right-clicked on the R x64 3.2.2 icon of the desktop and added after 1 space in the "Target" camp:

http_proxy=http://user_name:password@proxy.company_domain.es:8080/

当我收到消息时,它不起作用:

It did not work as I received the message:

install.packages中的警告:无法打开:HTTP状态为'407 需要代理身份验证"

Warning in install.packages : cannot open: HTTP status was '407 Proxy Authentication Required'

第二次尝试: 创建一个名称为

SECOND TRY: Create a notepad file with the name:

.Renviron

.Renviron

将其保存在"C:\Users\username\Documents"中.

文件包含以下两行:

http_proxy=http://proxy.company_domain.es/
http_proxy_user=user_name:password

当我尝试安装软件包时,我收到:

When I try installing a package I receive:

"install.packages中的警告:无法连接到 端口80上的"cran.rstudio.com". 无法访问存储库 http://cran.rstudio.com/src/contrib "

"Warning in install.packages : unable to connect to 'cran.rstudio.com' on port 80. Unable to access index for repository http://cran.rstudio.com/src/contrib"

在运行代码行之后:R.home()我的R_HOME路线是:

After running code line: R.home() My R_HOME route is:

"C:/Program Files/R/R-32〜1.2"

"C:/Program Files/R/R-32~1.2"

在此感谢您的建议和帮助.

I appreciate before-hand for your advice and help.

推荐答案

谢谢您的提问.它帮助我解决了我的问题.我必须取消标记该选项才能使用Internet Explorer中的设置并重新启动.

Thank you for your question. It helped me to resolve my issue. I had to unmark the option to use the settings from the Internet Explorer and restart.

也许您的.Renviron不包含代理端口,您必须编写

Maybe your .Renviron does not contain the proxy port, you have to write

http_proxy=http://proxy.company_domain.es:8080/
http_proxy_user=user_name:password

如果您指定

http_proxy_user=ask

它应该提示您输入用户名和密码-这样您就知道文件已被读取

it should prompt you for user name and password - then you know that the file is read

这篇关于Windows上的RStudio代理配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆