Hello. I am new to R, trying to learn it. And i have come to a hurdle on the first step! I am trying to simply download the excel reader package and i keep getting this message. Any ideas?
Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
cannot open the connection
Calls: sourceWithProgress ... -> .install.winbinary -> unpackPkgZip -> read.dcf
In addition: Warning messages:
1: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
2: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
cannot open compressed file 'glue/DESCRIPTION', probable reason 'No such file or directory'
Execution halted
I'm afraid we don't have enough information to help you out, can you please post the specific command you are using to install the package and the complete console output you get?
install.packages("readxl")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/vcedwards/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘glue’, ‘cli’, ‘utf8’, ‘rematch’, ‘ellipsis’, ‘fansi’, ‘lifecycle’, ‘magrittr’, ‘pillar’, ‘pkgconfig’, ‘rlang’, ‘vctrs’, ‘hms’, ‘prettyunits’, ‘R6’, ‘crayon’, ‘cellranger’, ‘tibble’, ‘cpp11’, ‘progress’
Warning in install.packages :
error 1 in extracting from zip file
Warning in install.packages :
cannot open compressed file 'glue/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection
(note that the 'trying URL...' output section is repeated 12 times, but i am unable to post more than two links on here.
Thank you
To avoid this limitation when posting console output you have to post it as formatted code, here is how to do it.
It seems downloaded binaries are getting corrupted somehow, maybe an encoding issue. Old R versions can't handle utf-8 on Windows systems. I would try updating to the latest R version 4.2.1.