Hi there. Trying to install packages and for some (knitr example below), I'm receiving the "binary source needs_compilation" error, and the packages do not install (even though it says that it has) whether I hit yes or no. On the MacOS Catalina and the latest version of R and RStudio (updated everything to try and fix) and have XQuartz downloaded.
Error message below
also installing the dependency ‘xfun’
There are binary versions available but the source versions are later:
binary source needs_compilation
xfun 0.14 0.15 TRUE
knitr 1.28 1.29 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.14.tgz'
Content type 'application/x-gzip' length 197792 bytes (193 KB)
downloaded 193 KB
The downloaded binary packages are in
installing the source package ‘knitr’
trying URL 'https://cran.rstudio.com/src/contrib/knitr_1.29.tar.gz'
Content type 'application/x-gzip' length 885623 bytes (864 KB)
downloaded 864 KB
- installing source package ‘knitr’ ...
** package ‘knitr’ successfully unpacked and MD5 sums checked
** using staged installation
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace ‘xfun’ 0.14 is being loaded, but >= 0.15 is required
Calls: ... namespaceImportFrom -> asNamespace -> loadNamespace
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