Issues installing tidyverse package (Curl)

I get this error message when installing tidyverse

I write:

install.packages("tidyverse")

Return message:
Warning in install.packages :
error 1 in extracting from zip file
Warning in install.packages :
cannot open compressed file 'curl/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection

I manage to install many other packages. Do anyone know what I can do to fix this issue?

Thanks
Jan

Sometimes weird errors like this occur. Did you try installing curl by itself?

install.packages("curl")

Do you have R 3.6?

You could remove.packages on curl, then restart your machine and try again.

install.packages("curl")
Installing package into ‘C:/Users/xxx/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.6/curl_4.2.zip'
Content type 'application/zip' length 4123072 bytes (3.9 MB)
downloaded 596 KB

Warning in install.packages :
downloaded length 610304 != reported length 4123072
Warning in install.packages :
error 1 in extracting from zip file
Warning in install.packages :
cannot open compressed file 'curl/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection

It looks like you are only getting part of the download. I am getting 3.9 MB and you are getting 596 KB

This post suggest you might need to remove some stuff from your library first.

" Check in .../R/win-library/3.6/ for curl (remove or move out of the way if present) and/or any directories starting with 0 (temporary dirs during installation process)."

1 Like

Deleted the entire library but did not help. It cannot find curl package but still produce issues when I try to install

remove.packages("curl")
Removing package from ‘C:/Users/xxx/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Error in remove.packages : there is no package called ‘curl’
install.packages("curl")
Installing package into ‘C:/Users/xx/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.6/curl_4.2.zip'
Content type 'application/zip' length 4123072 bytes (3.9 MB)
downloaded 596 KB

Warning in install.packages :
downloaded length 610304 != reported length 4123072
Warning in install.packages :
error 1 in extracting from zip file
Warning in install.packages :
cannot open compressed file 'curl/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection

I wonder if it's because you are storing your packages in /Documents/. I have R and packages directly on the C drive.

C:\R\R-3.6.1\library\curl

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

Still does not work

install.packages("curl")
Installing package into ‘C:/Users/jm001/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.6/curl_4.2.zip'
Content type 'application/zip' length 4123072 bytes (3.9 MB)
downloaded 596 KB

Warning in install.packages :
downloaded length 610304 != reported length 4123072
Warning in install.packages :
error 1 in extracting from zip file
Warning in install.packages :
cannot open compressed file 'curl/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection

I can however install other packages without problem

> remove.packages("curl")
Removing package from ‘C:/R/R-3.6.1/library’
(as ‘lib’ is unspecified)
> install.packages("curl")
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/curl_4.2.zip'
Content type 'application/zip' length 4123072 bytes (3.9 MB)
downloaded 3.9 MB

package ‘curl’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\WoodwardS\AppData\Local\Temp\RtmpyIAmPF\downloaded_packages
> 

Yes 3.6.1
Uninstalled and installed R and Rstudio again now. Didnt help.
How to remove packages on curl? I do not understand this sentence

Already tried but does not work since it is not installed

remove.packages("curl")
Removing package from ‘C:/Users/jmoberg001/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Error in remove.packages : there is no package called ‘curl