gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 18:28:34 24 4
gpt4 key购买 nike

高拉夫·潘迪

我使用了命令

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

起初它起作用了。
但是在终端中重新启动它时,它显示了以下错误。-
 cannot open: HTTP status was '407 Proxy Authentication Required

如何解决这个问题。帮助,,,

最佳答案

您为运行 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 中运行命令.

关于r - 如何在 R ( ubuntu ) 中设置代理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15462581/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com