I get the following error after trying to install 'devtools' via install.packages('devtools').
n R CMD INSTALL
- installing source package 'waldo' ... ** package 'waldo' successfully unpacked and MD5 sums checked ** R ** byte-compile and prepare package for lazy loading Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : namespace 'rlang' 0.4.5 is being loaded, but >= 1.0.0 is required ERROR: lazy loading failed for package 'waldo'
- removing 'C:/Users/USER/Documents/R/win-library/3.5/waldo' In R CMD INSTALL
- installing source package 'callr' ... ** package 'callr' successfully unpacked and MD5 sums checked ** R ** inst ** byte-compile and prepare package for lazy loading Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : namespace 'processx' 3.4.2 is being loaded, but >= 3.6.1 is required ERROR: lazy loading failed for package 'callr'
- removing 'C:/Users/USER/Documents/R/win-library/3.5/callr' In R CMD INSTALL
- installing source package 'lifecycle' ... ** package 'lifecycle' successfully unpacked and MD5 sums checked ** R ** inst ** byte-compile and prepare package for lazy loading Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : namespace 'rlang' 0.4.5 is being loaded, but >= 0.4.10 is required ERROR: lazy loading failed for package 'lifecycle'
- removing 'C:/Users/USER/Documents/R/win-library/3.5/lifecycle' In R CMD INSTALL ERROR: dependency 'cachem' is not available for package 'memoise'
- removing 'C:/Users/USER/Documents/R/win-library/3.5/memoise' In R CMD INSTALL
- installing source package 'sessioninfo' ... ** package 'sessioninfo' successfully unpacked and MD5 sums checked ** R ** byte-compile and prepare package for lazy loading Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : namespace 'cli' 2.0.2 is being loaded, but >= 3.1.0 is required ERROR: lazy loading failed for package 'sessioninfo'
- removing 'C:/Users/USER/Documents/R/win-library/3.5/sessioninfo' In R CMD INSTALL
- installing source package 'usethis' ... ** package 'usethis' successfully unpacked and MD5 sums checked ** R ** inst ** byte-compile and prepare package for lazy loading Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : namespace 'rlang' 0.4.5 is being loaded, but >= 1.0.0 is required ERROR: lazy loading failed for package 'usethis'
- removing 'C:/Users/USER/Documents/R/win-library/3.5/usethis' In R CMD INSTALL ERROR: dependency 'sessioninfo' is not available for package 'rcmdcheck'
- removing 'C:/Users/USER/Documents/R/win-library/3.5/rcmdcheck' In R CMD INSTALL ERROR: dependencies 'usethis', 'rcmdcheck', 'sessioninfo' are not available for package > 'devtools'
- removing 'C:/Users/USER/Documents/R/win-library/3.5/devtools'
The downloaded source packages are in 'C:\Users\USER\AppData\Local\Temp\RtmpSGxpAV\downloaded_packages' Warning messages: 1: In install.packages("devtools") : installation of package 'waldo' had non-zero exit status 2: In install.packages("devtools") : installation of package 'callr' had non-zero exit status 3: In install.packages("devtools") : installation of package 'lifecycle' had non-zero exit status 4: In install.packages("devtools") : installation of package 'memoise' had non-zero exit status 5: In install.packages("devtools") : installation of package 'sessioninfo' had non-zero exit status 6: In install.packages("devtools") : installation of package 'usethis' had non-zero exit status 7: In install.packages("devtools") : installation of package 'rcmdcheck' had non-zero exit status 8: In install.packages("devtools") : installation of package 'devtools' had non-zero exit status
After analyzing the error message, I realized that all the source packages ended with 'tar.gz' seem not to be decompressed as folders.
What should I install prior to running the install.packages('devtools') command?
and finally, how can I install 'devtools' automatically?