I'm trying to download some packages, but I get the same error everytime:
EXAMPLE:
install.packages("jtools")
Installing package into ‘C:/Users/Iris/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
However, it starts downloading after all, but then this happens:
install.packages("jtools")
Installing package into ‘C:/Users/Iris/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘ggplot2’
There are binary versions available but the source versions are later:
binary source needs_compilation
ggplot2 3.1.1 3.3.2 FALSE
jtools 2.0.0 2.1.0 FALSE
installing the source packages ‘ggplot2’, ‘jtools’
installing source package 'ggplot2' ...
** package 'ggplot2' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called 'pillar'
ERROR: lazy loading failed for package 'ggplot2'
removing 'C:/Users/Iris/Documents/R/win-library/3.4/ggplot2'
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\Iris\Documents\R\win-library\3.4" C:\Users\Iris\AppData\Local\Temp\Rtmpwth2f2/downloaded_packages/ggplot2_3.3.2.tar.gz' had status 1
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
ERROR: dependency 'ggplot2' is not available for package 'jtools'
removing 'C:/Users/Iris/Documents/R/win-library/3.4/jtools'
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\Iris\Documents\R\win-library\3.4" C:\Users\Iris\AppData\Local\Temp\Rtmpwth2f2/downloaded_packages/jtools_2.1.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘jtools’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Iris\AppData\Local\Temp\Rtmpwth2f2\downloaded_packages’
If anyone could help me I would be very happy! Since I really need this package
My biggest problem is that I get these errors with almost every package I try to install:
install.packages("pillar")
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/Iris/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘rlang’, ‘ellipsis’, ‘lifecycle’, ‘vctrs’
There are binary versions available but the source versions are later:
binary source needs_compilation
rlang 0.3.4 0.4.7 TRUE
ellipsis 0.1.0 0.3.1 TRUE
vctrs 0.1.0 0.3.1 TRUE
pillar 1.3.1 1.4.6 FALSE
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Iris\AppData\Local\Temp\RtmpQl6BKm\downloaded_packages
installing the source packages ‘lifecycle’, ‘pillar’
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/Iris/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\Iris\Documents\R\win-library\3.4" C:\Users\Iris\AppData\Local\Temp\RtmpQl6BKm/downloaded_packages/lifecycle_0.2.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'pillar'
removing 'C:/Users/Iris/Documents/R/win-library/3.4/pillar'
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\Iris\Documents\R\win-library\3.4" C:\Users\Iris\AppData\Local\Temp\RtmpQl6BKm/downloaded_packages/pillar_1.4.6.tar.gz' had status 1
Warning in install.packages :
installation of package ‘pillar’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Iris\AppData\Local\Temp\RtmpQl6BKm\downloaded_packages’
rlang .3.4 was installed from binary rather than the needed 0.4.7
If was you I would install R version 4, and the Rtools utility for version 4, and start again.
Also I personally use the renv package to handle my installs .
I think your R version of 3.4 is holding you back , but at a minimum give yourself to a chance to compile from source by having the appropriate Rtools utility https://cran.r-project.org/bin/windows/Rtools/history.html
you can make a new post about what you are doing and your problems.
probably this post will only be seen by those with an interest in reading about installation issues.