Unable to Install Tidyverse in R 4.3.1 Patched

I decided to update my R and Rstudio to the latest versions this morning and found out I had to reinstall all my packages again. It's been over an hour and I keep encountering one failed installation error after another and can't get any work done. The following is the screenshot showing the main error I'm experiencing related to Tidy Verse:

I'm working with my Org's IT department on being unable to download packages from CRAN, however, as we can see from the screenshot, I'm unable to manually install tidyverse from the tar.gz file due to this error. I did my best researching for the solution but nothing worked for me.

I appreciate all the help in advance and please let me know if I need to provide more info.

UPDATE: I tried installing dplyr manually from the tar.gz file and getting the same error, I don't know what's going on, I have never encountered this kind of issue before, I'm effectively rendered useless working with R today as I cannot work with base R, I am limited to attaching one screenshot per post but it's the same error above.

It's hard to guess the problem from a screenshot. A better approach is to just copy the entire error report an paste it here.

But, in any case my first guess is that you may need to install rlang manually and then try "tidyverse" again. Usually this sort of problem means that a package being installed cannot find a dependency that should be installed. There may be a complaint above the rlang message about not finding some package or system file.

I

It's all the same error repeated, I screenshotted the most relevant part but here's a wider view for your reference:

I'll try manually installing rlang but this looks like a wider issue with all the dependencies.

I managed to install rlang manually but Tidyverse is still giving the main error when trying to install both form CRAN and the tar.gz file

Packages may have other packages that they depend on, and those also need to be installed. This is not something that you want to do manually. You'll need to fix the issue with the downloads, so package installation works as it should.

Please send the entire text not a screenshot of some of the output. It is maddening trying work with a screenshot.

I am not even clear if you are trying to install directly from CRAN or perhaps the Rstudio CRAN or trying to install fcom a local tar.gz file. The fact that I have not done anything in Windows in ~15 years is not helping.

You may want to change repository : Tools > Global Options > Packages

I can't suggest one as any that I have used have been Linux ones for years.

I have been assuming that you are trying to install from within RStudio. What happens if you load R on its own and you try to install something from there? If you try a straight R approach, I would suggest trying something simple as tidyvere because it is a meta-package can be touchy.

Here's the text output of the error as requested: Warning in install.packages :
downloaded length 0 != reported length 0
Warning in install.packages :
URL 'xml2_1.3.5.zip': status was 'Failure when receiving data from the peer'
Error in download.file(url, destfile, method, mode = "wb", ...) :
download from 'xml2_1.3.5.zip' failed
Warning in install.packages :
download of package ‘xml2’ failed
trying URL 'tidyverse_2.0.0.zip'
Content type 'application/zip' length 430852 bytes (420 KB)
downloaded 420 KB

package ‘tidyverse’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\minhazk\AppData\Local\Temp\RtmpyUVeCO\downloaded_packages

library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’:
.onAttach failed in attachNamespace() for 'tidyverse', details:
call: NULL
error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘rlang’
install.packages("C:/Users/minhazk/Downloads/tidyverse_2.0.0.tar.gz", repos = NULL, type = "source")
ERROR: dependencies 'cli', 'dplyr', 'haven', 'purrr', 'ragg', 'readr', 'rlang', 'tibble', 'tidyr', 'xml2' are not available for package 'tidyverse'

  • removing 'C:/Program Files/R/R-4.3.1patched/library/tidyverse'
    Warning in install.packages :
    installation of package ‘C:/Users/minhazk/Downloads/tidyverse_2.0.0.tar.gz’ had non-zero exit status

install.packages("rlang")
trying URL '-rlang_1.1.1.zip'
Content type 'application/zip' length 1568556 bytes (1.5 MB)
downloaded 664 KB

Warning in install.packages :
downloaded length 0 != reported length 0
Warning in install.packages :
URL 'rlang_1.1.1.zip': status was 'Failure when receiving data from the peer'
Error in download.file(url, destfile, method, mode = "wb", ...) :
download from 'rlang_1.1.1.zip' failed
Warning in install.packages :
download of package ‘rlang’ failed

library(tidyverse)
Error in library(tidyverse) : there is no package called ‘tidyverse’
install.packages("C:/Users/minhazk/Downloads/tidyverse_2.0.0.tar.gz", repos = NULL, type = "source")
ERROR: dependencies 'cli', 'dplyr', 'haven', 'purrr', 'ragg', 'readr', 'rlang', 'tibble', 'tidyr', 'xml2' are not available for package 'tidyverse'

  • removing 'C:/Program Files/R/R-4.3.1patched/library/tidyverse'
    Warning in install.packages :
    installation of package ‘C:/Users/minhazk/Downloads/tidyverse_2.0.0.tar.gz’ had non-zero exit status

I am trying to install the package from CRAN but also the local tar.gz file as a backup, it usually always works when I have no options but I find it alarming to see it saying the list of packages are not part of tidyverse. I'll try to install the packages within R itself next.

Right but the TidyVerse tar.gz file should have all its dependencies to allow us to install it manually if we can't get it from the repo. What does it mean when it says 'dplyr' is not part of the package? I find that alarming, installing the tar.gz files always worked for me when the repo connection wasn't working.

In theory but there are times when it does not. I have had to manually install up to 5 dependent packages to get tidyverse or another package to install.

I do not remember ever seeing a error message like

URL 'xml2_1.3.5.zip': status was 'Failure when receiving data from the peer'
Error in download.file(url, destfile, method, mode = "wb", ...) :
download from 'xml2_1.3.5.zip' failed

but have a look at

You may have a firewall problem?

Yes, My ORG's IT is still trying to resolve the issue, that error signifies that, I thought manually installing it from the tar.gz file will be a workaround when I can't connect to the repo but seems not in this case. I'm still having a tough time understanding 'dplyr' and 'ggplot2' and etc. not being part of tidyverse, is that really a dependency error?

Ok I managed to change to the U of Waterloo Repository and installed tidyverse from there but it's weird because I had to manually attach dplyr and stringr packages along with install couple of dependencies but overall I managed to get my code running again. Thank you.

I'm gonna continue to get IT to fix the issue so I can rely on the main global repo again.

[quote=" I'm still having a tough time understanding 'dplyr' and 'ggplot2' and etc. not being part of tidyverse, is that really a dependency error?
[/quote]

Yes & no? Gabor can explain it better I think but as I think of it tidyverse is a bundle of packages not one discrete package. Now many packages have dependencies that they need to install before the "target" package can be installed and occasionally they just don't.

It is just that a complicated meta-package like tidyverse probably has a strict installation order and if you need install dplyr before ggplot2 then dplyr is a 'sorta' dependency, I'd say.

I'd guess that dplyr or stringr was failing to install a dependency and the problem cascaded from there.

Good to see you got it installed.

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.