Tidyverse package installation

I am trying to install the package tidyverse but the following error keeps on occuring during installation: I had the package before in R version 3.6.1 and RStudio 1.2.1335 but when i reinstalled R and Rstudio to latest versions I could nolonger use it. I have tried installing the xml2 package but I still get an error. Any assistance will be appreciated.

install.packages("tidyverse")
#> Installing package into 'C:/Users/WIKON/Documents/R/win-library/3.6'
#> (as 'lib' is unspecified)
#> also installing the dependency 'xml2'
#> 
#>   There is a binary version available but the source version is
#>   later:
#>      binary source needs_compilation
#> xml2  1.3.1  1.3.2              TRUE
#> 
#> package 'tidyverse' successfully unpacked and MD5 sums checked
#> 
#> The downloaded binary packages are in
#>  C:\Users\WIKON\AppData\Local\Temp\Rtmp8aVqyO\downloaded_packages
#> installing the source package 'xml2'
#> Warning in install.packages("tidyverse"): installation of package 'xml2'
#> had non-zero exit status

Created on 2020-04-25 by the reprex package (v0.3.0)

Install xml2 package first,
When option for select *use compiled ~~ * for installing xml2, select NO and It worked for me.

image

Thank you @jhk0530. I have done that but when i try to install tidyverse again i get this:

install.packages("tidyverse")
#> Installing package into 'C:/Users/WIKON/Documents/R/win-library/3.6'
#> (as 'lib' is unspecified)
#> Warning in readRDS(dest): lzma decoding result 10
#> also installing the dependency 'xml2'
#> 
#>   There is a binary version available but the source version is
#>   later:
#>      binary source needs_compilation
#> xml2  1.3.1  1.3.2              TRUE
#> 
#> package 'tidyverse' successfully unpacked and MD5 sums checked
#> 
#> The downloaded binary packages are in
#>  C:\Users\WIKON\AppData\Local\Temp\RtmpSICHfC\downloaded_packages
#> installing the source package 'xml2'
#> Warning in install.packages("tidyverse"): installation of package 'xml2'
#> had non-zero exit status

Created on 2020-04-27 by the reprex package (v0.3.0)
This is what im getting on my screen.

Warning in install.packages :
lzma decoding result 10
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/WIKON/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘tidyverse’ is not available (for R version 3.6.3)

have you installed Rtools ?
Error message said you don't have it.
and you can installed from this Rtools link

If your R version is 4, use Rtools 40. or use Rtools 35

1 Like

My R version is 3.6.3 and I installed Rtools 40. Could that be the problem?

I'm not expert for Rtools but they saids, Rtools 40 is targetted for R 4.0 and UP.

so I recommend you to either use Rtools 35 or R 4.0.

1 Like

Thank you @jhk0530. I have installed Rtools 35 and it worked. I was using Rtools 40 for R version 3.6.3.

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