I'm having troubles installing RMarkdown for using knitr and publish my work, I'm using R Studio v2023.06.1 on a Mac with a macOS Monterey version 12.6.3. This is what I'm getting:
install.packages("knitr")
also installing the dependency ‘xfun’
There are binary versions available but the source versions are later:
binary source needs_compilation
xfun 0.30 0.40 TRUE
knitr 1.38 1.44 FALSE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) no
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/xfun_0.30.tgz'
Content type 'application/x-gzip' length 392013 bytes (382 KB)
downloaded 382 KB
The downloaded binary packages are in
/var/folders/9s/pn6v4gc16kj08cl5t9t_m03w0000gn/T//RtmprSEJ0v/downloaded_packages
installing the source package ‘knitr’
trying URL 'https://cran.rstudio.com/src/contrib/knitr_1.44.tar.gz'
Content type 'application/x-gzip' length 898526 bytes (877 KB)
downloaded 877 KB
- 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.30 is being loaded, but >= 0.39 is required
Calls: ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘knitr’ - removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/knitr’
Warning in install.packages :
installation of package ‘knitr’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/9s/pn6v4gc16kj08cl5t9t_m03w0000gn/T/RtmprSEJ0v/downloaded_packages’
Any idea?
Thanks in advanced