我试图在R4.2.0(ubuntu20.04)中使用install.packages(“獾”)。但是当它下载一些文件时,它说错误407:
.....
* installing *source* package 'gert' ...
** package 'gert' successfully unpacked and MD5 sums checked
** using staged installation
> curl::curl_download("https://r-lib.github.io/gert/get-libgit2-linux.sh","get-libgit2-linux.sh")
Error in curl::curl_download("https://r-lib.github.io/gert/get-libgit2-linux.sh", :
Received HTTP code 407 from proxy after CONNECT
Execution halted
Using PKG_CFLAGS=
Using PKG_LIBS=-lgit2
......然而:
curl https://r-lib.github.io/gert/get-libgit2-linux.sh中从根和用户下载。curl::curl_download("https://r-lib.github.io/gert/get-libgit2-linux.sh","index.html")时,这个文件会产生同样的错误。curl::curl_download("https://github.com","index.html")工作得很好。curl::curl_download("https://google.com","index.html")给出了同样的错误407。Sys.setenv(https_proxy = )和Sys.setenv(https_proxy_user = )设置代理服务器时,它无助于使用curl下载上述文件,而且,安装甚至在更早的阶段结束:Warning: unable to access index for repository https://cloud.r-project.org/src/contrib:
cannot open URL 'https://cloud.r-project.org/src/contrib/PACKAGES'
Warning message:
package 'badger' is not available for this version of Rhttps_proxy和http_proxy变量时,安装程序会冻结下载索引,因为我们公司使用代理服务器,没有代理服务器就无法访问internet:> install.packages("badger")
Installing package into '/usr/local/lib/R/site-library'
(as 'lib' is unspecified)
^C> install.packages("badger")
Installing package into '/usr/local/lib/R/site-library'
(as 'lib' is unspecified)
Error in readRDS(dest) : error reading from connection它会是什么,我怎样才能让卷发工作?或者如何在没有卷曲的情况下安装上述软件包?
提前谢谢。
发布于 2022-10-03 06:59:53
错误指示,由于某些原因,代理设置不正确或代理设置过期。后者是我在OpenSuse上的情况。
解决方案:
yast,通过终端进行检查。这将打开终端UI视图,在该视图中,您可以导航到安装并测试“网络代理”和“网络代理用户”设置。或
~/.curlrc的文件。编辑这个,在这里设置您的代理和代理用户。打开新的bash/会话以验证更改。测试使用,终端上的zypper refresh命令。
注意事项(可选):其他可能的捕获-一些旧的回购-URL是无法到达的。在您将zypper更新为zypper update之前,可能需要禁用它。例如:
$ ls /etc/zypp/repos.d/
$ vi suse_update.repo<编辑,将enabled=1替换为enabled=0__>
4 4MoreInfo
https://stackoverflow.com/questions/72982641
复制相似问题