Unable to install tidyverse packages

Here are the errors I got, hope anyone can help with.
Mac
version 10.10.2 (14C109
processor 2.4 GHz Intel Core i5
memory 4 GB 1600 MHz DDR3

R studio
Version 1.1.456 – © 2009-2018 RStudio, Inc.

> install.packages("tidyverse")
also installing the dependencies ‘knitr’, ‘rmarkdown’, ‘broom’, ‘modelr’, ‘reprex’, ‘stringr’


  There are binary versions available but the source
  versions are later:
          binary source needs_compilation
knitr       1.18   1.20             FALSE
rmarkdown    1.8   1.10             FALSE
broom      0.4.3  0.5.0             FALSE
modelr     0.1.1  0.1.2             FALSE
stringr    1.2.0  1.3.1             FALSE
tidyverse  1.1.1  1.2.1             FALSE

installing the source packages ‘knitr’, ‘rmarkdown’, ‘broom’, ‘modelr’, ‘reprex’, ‘stringr’, ‘tidyverse’

trying URL 'https://cran.rstudio.com/src/contrib/knitr_1.20.tar.gz'
Content type 'unknown' length 650082 bytes (634 KB)
==================================================
downloaded 634 KB

trying URL 'https://cran.rstudio.com/src/contrib/rmarkdown_1.10.tar.gz'
Content type 'unknown' length 2447327 bytes (2.3 MB)
==================================================
downloaded 2.3 MB

trying URL 'https://cran.rstudio.com/src/contrib/broom_0.5.0.tar.gz'
Content type 'unknown' length 1228314 bytes (1.2 MB)
==================================================
downloaded 1.2 MB

trying URL 'https://cran.rstudio.com/src/contrib/modelr_0.1.2.tar.gz'
Content type 'unknown' length 118432 bytes (115 KB)
==================================================
downloaded 115 KB

trying URL 'https://cran.rstudio.com/src/contrib/reprex_0.2.1.tar.gz'
Content type 'unknown' length 1029128 bytes (1005 KB)
==================================================
downloaded 1005 KB

trying URL 'https://cran.rstudio.com/src/contrib/stringr_1.3.1.tar.gz'
Content type 'unknown' length 119156 bytes (116 KB)
==================================================
downloaded 116 KB

trying URL 'https://cran.rstudio.com/src/contrib/tidyverse_1.2.1.tar.gz'
Content type 'unknown' length 61647 bytes (60 KB)
==================================================
downloaded 60 KB

* installing *source* package ‘stringr’ ...
** package ‘stringr’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in library.dynam(lib, package, package.lib) : 
  shared object ‘stringi.so’ not found
ERROR: lazy loading failed for package ‘stringr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/stringr’
Warning in install.packages :
  installation of package ‘stringr’ had non-zero exit status
ERROR: dependency ‘stringr’ is not available for package ‘knitr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/knitr’
Warning in install.packages :
  installation of package ‘knitr’ had non-zero exit status
ERROR: dependency ‘stringr’ is not available for package ‘broom’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/broom’
Warning in install.packages :
  installation of package ‘broom’ had non-zero exit status
ERROR: dependencies ‘knitr’, ‘stringr’ are not available for package ‘rmarkdown’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rmarkdown’
Warning in install.packages :
  installation of package ‘rmarkdown’ had non-zero exit status
ERROR: dependency ‘broom’ is not available for package ‘modelr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/modelr’
Warning in install.packages :
  installation of package ‘modelr’ had non-zero exit status
ERROR: dependency ‘rmarkdown’ is not available for package ‘reprex’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/reprex’
Warning in install.packages :
  installation of package ‘reprex’ had non-zero exit status
ERROR: dependencies ‘broom’, ‘modelr’, ‘reprex’, ‘stringr’ are not available for package ‘tidyverse’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/tidyverse’
Warning in install.packages :
  installation of package ‘tidyverse’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/kr/qq7xfzw52z90ssc32q04yy340000gn/T/Rtmph6NBp6/downloaded_packages’

Hi @jiaonama! Welcome!

Two thoughts:

  • You seem to be running an old version of R (3.3, which is 2 years old now). The more out of date R is, the harder it gets to install current versions of packages. Unless you have a good reason to run old R, consider updating R and then trying this all again.
  • You seem to be missing the stringr dependency stringi. This is causing a cascade of missing dependencies. Try install.packages("stringi"). If that’s successful, you can try installing tidyverse again.
3 Likes