I am attempting to use Rstudio on my work computer. I was unable to create an rmarkdown. I was getting errors that i needed to download certain packages. I download the packages and get the error above.
I downloaded Rstudio version ""Ghost Orchid" Release (fc9e2179, 2022-01-04) for Windows" and rtools 3.5. I have tried to download several packages and I keep getting the same error "installation of package ‘PACKAGE ATTEMPTING TO INSTALL’ had non-zero exit status." I checked my Paths using .libPaths() and got:
[1] "C:/Users/Usernumber/OneDrive -company/My Documents/R/win-library/3.6"
[2] "C:/Program Files/R/R-3.6.3/library"
I try installing 'rmarkdown' and get:
install.packages('rmarkdown')
Installing package into ‘C:/Users/userumber/OneDrive - company/My Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependencies ‘xfun’, ‘knitr’, ‘tinytex’
There are binary versions available but the source versions are later:
binary source needs_compilation
xfun 0.22 0.29 TRUE
knitr 1.33 1.37 FALSE
tinytex 0.31 0.36 FALSE
rmarkdown 2.8 2.11 FALSE
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/xfun_0.22.zip'
Content type 'application/zip' length 323923 bytes (316 KB)
downloaded 316 KB
package ‘xfun’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\usernumber\AppData\Local\Temp\RtmpqQI1ZK\downloaded_packages
installing the source packages ‘knitr’, ‘tinytex’, ‘rmarkdown’
trying URL
Content type 'application/x-gzip' length 895567 bytes (874 KB)
downloaded 874 KB
trying URL
Content type 'application/x-gzip' length 31525 bytes (30 KB)
downloaded 30 KB
trying URL
Content type 'application/x-gzip' length 3212367 bytes (3.1 MB)
downloaded 3.1 MB
- installing source package 'knitr' ...
** package 'knitr' successfully unpacked and MD5 sums checked
** using staged installation
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'xfun' 0.22 is being loaded, but >= 0.27 is required
Calls: ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'knitr' - removing 'C:/Users/username/OneDrive - company/My Documents/R/win-library/3.6/knitr'
Warning in install.packages :
installation of package ‘knitr’ had non-zero exit status - installing source package 'tinytex' ...
** package 'tinytex' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'xfun' 0.22 is being loaded, but >= 0.29 is required
Calls: ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'tinytex' - removing 'C:/Users/username/OneDrive - company/My Documents/R/win-library/3.6/tinytex'
Warning in install.packages :
installation of package ‘tinytex’ had non-zero exit status
ERROR: dependencies 'knitr', 'tinytex' are not available for package 'rmarkdown' - removing 'C:/Users/username/OneDrive - company/My Documents/R/win-library/3.6/rmarkdown'
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\username\AppData\Local\Temp\RtmpqQI1ZK\downloaded_packages’
Please help so that I can start utilizing Rstudio.
Thanks!