【问题标题】:Error while installing the package "INLA"安装包“INLA”时出错
【发布时间】:2020-01-08 12:19:43
【问题描述】:

R 版本 3.6.2

Error in read.dcf(file.path(pkgname, "DESCRIPTION"),
   c("Package", "Type")) : 
         cannot open the connection
       In addition: Warning messages:
       1: In download.file(url, destfile, method, mode = "wb", ...) :
         downloaded length 210960384 != reported length 335976807
       2: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
       3: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
         cannot open compressed file 'INLA/DESCRIPTION', probable reason 'No such file or directory'

【问题讨论】:

标签: r install.packages


【解决方案1】:

我个人在这里发现一件有用的事情。由于 R-studio 自动将超时设置为 60 秒。如果包比较大(比如80M),需要下载100s左右,但是下载线程停在60s,导致错误长度210960384!=报告长度335976807。将默认下载时间更改为更长的时间将有助于解决这个问题一般。

# 100s
options(timeout=100)
# 200s
options(timeout=200)
# 1000s
options(timeout=1000)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-09-28
    • 2020-02-23
    • 2018-01-02
    • 2015-10-01
    • 2013-08-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多