警告“下载的长度!=报告的长度"从 CRAN 安装软件包 [英] Warning "downloaded length != reported length" in installing packages from CRAN

查看:22
本文介绍了警告“下载的长度!=报告的长度"从 CRAN 安装软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

搜索stackoverflow问题,我找到了这个链接:下载自定义文件时出现 file.download 错误.>

但是,我的情况有点不同(我认为):

1) 从 CRAN 安装一些软件包时(或者只是一些通常与所需软件包一起安装的依赖项)时,我收到了这个烦人的警告.

2) 下载的长度似乎总是等于报告的长度,所以应该没有警告.
举个例子,我在这里复制粘贴刚刚在更新mgcv时出现的警告.

警告信息:在 download.file(url, destfile, method, mode = "wb", ...) 中:下载长度 1886962 != 报告长度 1886962

mode 参数已设置为wb",因此 SO 链接中提供的解决方案似乎不起作用.

很奇怪,因为我最近因为其他原因重新安装了R和RStudio,但是这个警告并没有消失.

欢迎提供任何建议.

解决方案

我通过访问此网站 并下载所需的软件包.不同长度的问题是由于无法从 R 完全下载文件夹,所以我直接下载并从 Packages 中的安装按钮调用它并选择 zip 文件而不是 CRAN.然后只需选择文件夹,这就是我的解决方案.

Searching on stackoverflow questions, I found out this link: Error in file.download when downloading custom file .

However, my case is a little bit different (I think):

1) I get this annoying warning when installing some packages from CRAN (or also just some dependencies that get generally installed together with the required package).

2) The downloaded length always appear to be equal to the reported length, so there should be no warning.
As an example, I copy-paste here the warning that has just appeared in updating mgcv.

Warning message:
In download.file(url, destfile, method, mode = "wb", ...) :
  downloaded length 1886962 != reported length 1886962

The mode argument is already set to "wb", so the solution offered in the SO link does not seem to work.

It is very strange, because I have re-installed both R and RStudio recently for other reasons, but this warning has not desappeared.

Any advise is welcome.

解决方案

I solved my problem by going to this site and downloading the required package. The problem of different lengths was due to the inability to download the folder completely from R so I did download it directly and call it from the install button in Packages and selecting zip file rather than CRAN. Then just select the folder and that was for me the solution.

这篇关于警告“下载的长度!=报告的长度"从 CRAN 安装软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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