gpt4 book ai didi

r - 安装 R 包时无法打开压缩文件

转载 作者:行者123 更新时间:2023-12-05 06:44:06 27 4
gpt4 key购买 nike

当我尝试在 R 3.2.0 中安装新包时,最近出现了这个问题。我在尝试安装 vegan 时注意到了它,但我似乎对我尝试安装的所有软件包都收到了相同的消息,包括当我尝试从下载的 tar.gz 手动安装时。当我尝试安装任何软件包时收到的完整消息是:

utils:::menuInstallPkgs() also installing the dependency ‘permute’

trying URL 'http://cran.us.r-project.org/bin/windows/contrib/3.2/permute_0.8-4.zip' Content type 'application/zip' length 501108 bytes (489 KB) downloaded 489 KB

trying URL 'http://cran.us.r-project.org/bin/windows/contrib/3.2/vegan_2.3-0.zip' Content type 'application/zip' length 2863206 bytes (2.7 MB) downloaded 2.7 MB

Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) : cannot open the connection In addition: Warning messages: 1: In unzip(zipname, exdir = dest) : write error in extracting from zip file 2: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) : cannot open compressed file 'permute/DESCRIPTION', probable reason 'No such file or directory'

看了之前的问题,我尝试了:

install.packages("vegan", repos="http://cran.us.r-project.org")

但还是报同样的错误。我还尝试通过以下方式重置 repo 协议(protocol):

options(repos=c(CRAN="@CRAN@", CRANextra="http://www.stats.ox.ac.uk/pub/RWin")

但对于我尝试安装的任何软件包,仍然出现相同的错误。感谢您的帮助。

最佳答案

当我的计算机上没有剩余空间时,我遇到了同样的错误。我清理了一些空间,它起作用了!

关于r - 安装 R 包时无法打开压缩文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30904949/

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