jer8877
jer8877

Reputation: 31

Cannot open compressed file when installing R packages

This problem recently came up when I try to install new packages in R 3.2.0. I noticed it when trying to install vegan, but I seem to get the same message for all packages I try to install, including when I try to install manually from a downloaded tar.gz. The entire message I get when I try to install any package is:

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'

After looking at previous questions, I tried:

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

but still get the same error. I also tried to reset the repos with:

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

But still get the same error, for any package I try to install. Thanks for any help.

Upvotes: 3

Views: 5821

Answers (1)

gaga345
gaga345

Reputation: 11

I got the same error when there was no space left on my computer. I cleared some space and it worked!

Upvotes: 1

Related Questions