HELLO - I EVEN RE-INSTALLED RSTUDIO AND THEN INSTALLED PACKAGES AS BELOW BUT STILL NO LUCK:
install.packages("rmarkdown")
install.packages("knitr")
install.packages("tinytex")
install.packages("here")
install.packages("tidyverse")
install.packages("broom")
install.packages("fs")
install.packages("usethis")
TO ANSWER YOUR QUESTION, BELOW IS THE OUTPUT IN THE CONSOLE WHEN MANUALLY INSTALLING 'XFUN' AND 'TINYTEX' (YES, NOW IT'S NOT JUST 'TINYTEX' THAT DOESN'T INSTALL, ALSO 'XFUN'!). THANKS FOR HELPING OUT.
installing the source package ‘xfun’
trying URL 'https://cran.rstudio.com/src/contrib/xfun_0.21.tar.gz'
Content type 'application/x-gzip' length 103228 bytes (100 KB)
==================================================
downloaded 100 KB
* installing *source* package ‘xfun’ ...
** package ‘xfun’ successfully unpacked and MD5 sums checked
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘xfun’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/xfun’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/xfun’
[2/2] Installing tinytex...
The downloaded source packages are in
‘/private/var/folders/sj/pzkrqfcs5hxf_342x94rsp_00000gn/T/Rtmp30URDj/downloaded_packages’
also installing the dependency ‘xfun’
There are binary versions available but the source versions are later:
binary source needs_compilation
xfun 0.12 0.21 TRUE
tinytex 0.20 0.29 FALSE
installing the source packages ‘xfun’, ‘tinytex’
trying URL 'https://cran.rstudio.com/src/contrib/xfun_0.21.tar.gz'
Content type 'application/x-gzip' length 103228 bytes (100 KB)
==================================================
downloaded 100 KB
trying URL 'https://cran.rstudio.com/src/contrib/tinytex_0.29.tar.gz'
Content type 'application/x-gzip' length 27768 bytes (27 KB)
==================================================
downloaded 27 KB
* installing *source* package ‘xfun’ ...
** package ‘xfun’ successfully unpacked and MD5 sums checked
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘xfun’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/xfun’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/xfun’
* installing *source* package ‘tinytex’ ...
** package ‘tinytex’ 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 ‘xfun’ 0.12 is being loaded, but >= 0.19 is required
ERROR: lazy loading failed for package ‘tinytex’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/tinytex’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/tinytex’
The downloaded source packages are in
‘/private/var/folders/sj/pzkrqfcs5hxf_342x94rsp_00000gn/T/Rtmp30URDj/downloaded_packages’
✔ Packages successfully installed.
Warning messages:
1: In utils::install.packages("xfun", repos = "https://cran.rstudio.com/") :
installation of package ‘xfun’ had non-zero exit status
2: In utils::install.packages("tinytex", repos = "https://cran.rstudio.com/") :
installation of package ‘xfun’ had non-zero exit status
3: In utils::install.packages("tinytex", repos = "https://cran.rstudio.com/") :
installation of package ‘tinytex’ had non-zero exit status