Tidyverse not installing

> install.packages("tidyverse")
Installing package into ‘C:/Users/mattj/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘ellipsis’, ‘processx’, ‘vctrs’, ‘callr’, ‘lifecycle’, ‘dbplyr’, ‘dplyr’, ‘haven’, ‘hms’, ‘modelr’, ‘purrr’, ‘reprex’, ‘rlang’, ‘tibble’, ‘tidyr’, ‘xml2’


  There are binary versions available but the source versions are later:
           binary source needs_compilation
ellipsis    0.1.0  0.3.0              TRUE
processx    3.3.0  3.4.1              TRUE
vctrs       0.1.0  0.2.0              TRUE
callr       3.2.0  3.3.2             FALSE
dbplyr      1.4.0  1.4.2             FALSE
dplyr     0.8.0.1  0.8.3              TRUE
haven       2.1.0  2.2.0              TRUE
hms         0.4.2  0.5.2             FALSE
modelr      0.1.4  0.1.5             FALSE
purrr       0.3.2  0.3.3              TRUE
reprex      0.2.1  0.3.0             FALSE
rlang       0.3.4  0.4.2              TRUE
tibble      2.1.1  2.1.3              TRUE
tidyr       0.8.3  1.0.0              TRUE
xml2        1.2.0  1.2.2              TRUE
tidyverse   1.2.1  1.3.0             FALSE

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/ellipsis_0.1.0.zip'
Content type 'application/zip' length 30847 bytes (30 KB)
downloaded 30 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/processx_3.3.0.zip'
Content type 'application/zip' length 246452 bytes (240 KB)
downloaded 240 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/vctrs_0.1.0.zip'
Content type 'application/zip' length 499748 bytes (488 KB)
downloaded 488 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/dplyr_0.8.0.1.zip'
Content type 'application/zip' length 3029353 bytes (2.9 MB)
downloaded 2.9 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/haven_2.1.0.zip'
Content type 'application/zip' length 988500 bytes (965 KB)
downloaded 965 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/purrr_0.3.2.zip'
Content type 'application/zip' length 327437 bytes (319 KB)
downloaded 319 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/rlang_0.3.4.zip'
Content type 'application/zip' length 1080437 bytes (1.0 MB)
downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/tibble_2.1.1.zip'
Content type 'application/zip' length 238931 bytes (233 KB)
downloaded 233 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/tidyr_0.8.3.zip'
Content type 'application/zip' length 907112 bytes (885 KB)
downloaded 885 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/xml2_1.2.0.zip'
Content type 'application/zip' length 3543977 bytes (3.4 MB)
downloaded 3.4 MB

package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘processx’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked
package ‘haven’ successfully unpacked and MD5 sums checked
package ‘purrr’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘tibble’ successfully unpacked and MD5 sums checked
package ‘tidyr’ successfully unpacked and MD5 sums checked
package ‘xml2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\mattj\AppData\Local\Temp\Rtmpc96ekJ\downloaded_packages
installing the source packages ‘callr’, ‘lifecycle’, ‘dbplyr’, ‘hms’, ‘modelr’, ‘reprex’, ‘tidyverse’

trying URL 'https://cran.rstudio.com/src/contrib/callr_3.3.2.tar.gz'
Content type 'application/x-gzip' length 94404 bytes (92 KB)
downloaded 92 KB

trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_0.1.0.tar.gz'
Content type 'application/x-gzip' length 150752 bytes (147 KB)
downloaded 147 KB

trying URL 'https://cran.rstudio.com/src/contrib/dbplyr_1.4.2.tar.gz'
Content type 'application/x-gzip' length 303397 bytes (296 KB)
downloaded 296 KB

trying URL 'https://cran.rstudio.com/src/contrib/hms_0.5.2.tar.gz'
Content type 'application/x-gzip' length 136186 bytes (132 KB)
downloaded 132 KB

trying URL 'https://cran.rstudio.com/src/contrib/modelr_0.1.5.tar.gz'
Content type 'application/x-gzip' length 121130 bytes (118 KB)
downloaded 118 KB

trying URL 'https://cran.rstudio.com/src/contrib/reprex_0.3.0.tar.gz'
Content type 'application/x-gzip' length 1052597 bytes (1.0 MB)
downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/src/contrib/tidyverse_1.3.0.tar.gz'
Content type 'application/x-gzip' length 712837 bytes (696 KB)
downloaded 696 KB

* installing *source* package 'callr' ...
** package 'callr' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace 'processx' 3.3.0 is being loaded, but >= 3.4.0 is required
ERROR: lazy loading failed for package 'callr'
* removing 'C:/Users/mattj/Documents/R/win-library/3.4/callr'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\mattj\Documents\R\win-library\3.4" C:\Users\mattj\AppData\Local\Temp\Rtmpc96ekJ/downloaded_packages/callr_3.3.2.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘callr’ had non-zero exit status
* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'rlang' 0.3.4 is being loaded, but >= 0.4.0 is required
ERROR: lazy loading failed for package 'lifecycle'
* removing 'C:/Users/mattj/Documents/R/win-library/3.4/lifecycle'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\mattj\Documents\R\win-library\3.4" C:\Users\mattj\AppData\Local\Temp\Rtmpc96ekJ/downloaded_packages/lifecycle_0.1.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘lifecycle’ had non-zero exit status
* installing *source* package 'dbplyr' ...
** package 'dbplyr' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace 'pkgconfig' 2.0.1 is already loaded, but >= 2.0.2 is required
ERROR: lazy loading failed for package 'dbplyr'
* removing 'C:/Users/mattj/Documents/R/win-library/3.4/dbplyr'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\mattj\Documents\R\win-library\3.4" C:\Users\mattj\AppData\Local\Temp\Rtmpc96ekJ/downloaded_packages/dbplyr_1.4.2.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘dbplyr’ had non-zero exit status
* installing *source* package 'hms' ...
** package 'hms' successfully unpacked and MD5 sums checked
** R
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'vctrs' 0.1.0 is being loaded, but >= 0.2.0 is required
ERROR: lazy loading failed for package 'hms'
* removing 'C:/Users/mattj/Documents/R/win-library/3.4/hms'
* restoring previous 'C:/Users/mattj/Documents/R/win-library/3.4/hms'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\mattj\Documents\R\win-library\3.4" C:\Users\mattj\AppData\Local\Temp\Rtmpc96ekJ/downloaded_packages/hms_0.5.2.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘hms’ had non-zero exit status
* installing *source* package 'modelr' ...
** package 'modelr' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace 'pkgconfig' 2.0.1 is already loaded, but >= 2.0.2 is required
ERROR: lazy loading failed for package 'modelr'
* removing 'C:/Users/mattj/Documents/R/win-library/3.4/modelr'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\mattj\Documents\R\win-library\3.4" C:\Users\mattj\AppData\Local\Temp\Rtmpc96ekJ/downloaded_packages/modelr_0.1.5.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘modelr’ had non-zero exit status
ERROR: dependency 'callr' is not available for package 'reprex'
* removing 'C:/Users/mattj/Documents/R/win-library/3.4/reprex'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\mattj\Documents\R\win-library\3.4" C:\Users\mattj\AppData\Local\Temp\Rtmpc96ekJ/downloaded_packages/reprex_0.3.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘reprex’ had non-zero exit status
ERROR: dependencies 'dbplyr', 'modelr', 'reprex' are not available for package 'tidyverse'
* removing 'C:/Users/mattj/Documents/R/win-library/3.4/tidyverse'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\mattj\Documents\R\win-library\3.4" C:\Users\mattj\AppData\Local\Temp\Rtmpc96ekJ/downloaded_packages/tidyverse_1.3.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘tidyverse’ had non-zero exit status

The downloaded source packages are in
	‘C:\Users\mattj\AppData\Local\Temp\Rtmpc96ekJ\downloaded_packages’
>

As you are installing from an old R version, I think the dependency tree does not resolve well regarding minimum version.

I suggest you install the :package: that gives an error individually (callr, rlang, pkgconfig, vctrs, ...) then use remotes::install_cran so that they are seen installed and not be reinstalled.

You can also try remotes::install_cran("tidyverse") or pak::pkg_install("tidyverse") because they may resolve more cleverly the dependencies. :thinking:

1 Like

Update dependencies.

The message at the top tells you that the pre-compiled binaries are older than the build from source versions. On windows, package installation does not default to build from source. ( install.packages docs )

The error you run into when trying to install callr tells you that it's looking for the processx package with a version number greater than 3.4.0, but you've only got 3.3.0 installed currently. So the processx package has to be updated before you install callr.

Build from source

On windows, this requires RTools to provide the tooling such as a compiler. Once you've got that installed, you can try building packages from source.

Try it out with callr

# Check version
packageVersion("callr") #‘3.3.1’
# Build from source
install.packages("callr", type="source")
# Check version
packageVersion("callr") #‘3.4.0’ 

Then try on entire dependency tree of tidyverse

install.packages("tidyverse", type="source")

or

options("install.packages.compile.from.source"=TRUE)
install.packages("tidyverse")

I don't recall if setting the compile from source will cause it to do so if the source version is later, but it might be worth a shot, so that you won't waste time compiling packages that have up to date binaries.

2 Likes

RTools did the trick, thanks a lot!

1 Like

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