title: Unable to use R Markdown in RStudio due to required packages
body: <p>I am unable to use R Markdown in RStudio and am trying to figure out what is going wrong.</p>
  <p>I simply open RStudio, go to File &gt; New File &gt; R Markdown...</p>
  <p>And then the following pop-up message appears:
  <a href="https://i.stack.imgur.com/R2FZW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R2FZW.png" alt="enter image description here" /></a></p>
  <p>And so I click &quot;Yes&quot;.</p>
  <p>And then I find the following in my &quot;Jobs&quot; display:</p>
  <pre><code>** Installing R Package Dependencies for R Markdown: 'glue', 'knitr', 'rmarkdown', 'xfun'
  
  
  
  [1/5] Installing glue...
  
  Installing package into 'C:/Users/lino/Documents/R/win-library/3.5'
  (as 'lib' is unspecified)
  
    There is a binary version available but the source version is later:
       binary source needs_compilation
  glue  1.4.0  1.4.2              TRUE
  
    Binaries will be installed
  trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/glue_1.4.0.zip'
  Content type 'application/zip' length 157284 bytes (153 KB)
  ==================================================
  downloaded 153 KB
  
  package 'glue' successfully unpacked and MD5 sums checked
  
  The downloaded binary packages are in
      C:\Users\lino\AppData\Local\Temp\Rtmpm8AlsN\downloaded_packages
  
  
  [2/5] Installing xfun...
  
  Installing package into 'C:/Users/lino/Documents/R/win-library/3.5'
  (as 'lib' is unspecified)
  
    There is a binary version available but the source version is later:
       binary source needs_compilation
  xfun   0.13   0.25              TRUE
  
    Binaries will be installed
  trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/xfun_0.13.zip'
  package 'xfun' successfully unpacked and MD5 sums checked
  Content type 'application/zip' length 184719 bytes (180 KB)
  ==================================================
  downloaded 180 KB
  
  
  The downloaded binary packages are in
      C:\Users\lino\AppData\Local\Temp\Rtmpm8AlsN\downloaded_packages
  
  
  [3/5] Installing knitr...
  
  Installing package into 'C:/Users/lino/Documents/R/win-library/3.5'
  (as 'lib' is unspecified)
  also installing the dependency 'xfun'
  
  
    There are binary versions available but the source versions are later:
        binary source needs_compilation
  xfun    0.13   0.25              TRUE
  knitr   1.28   1.33             FALSE
  
    Binaries will be installed
  trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/xfun_0.13.zip'
  Content type 'application/zip' length 184719 bytes (180 KB)
  =======package 'xfun' successfully unpacked and MD5 sums checked
  ===========================================
  downloaded 180 KB
  
  
  The downloaded binary packages are in
      C:\Users\lino\AppData\Local\Temp\Rtmpm8AlsN\downloaded_packages
  installing the source package 'knitr'
  
  trying URL 'https://cran.rstudio.com/src/contrib/knitr_1.33.tar.gz'
  Content type 'application/x-gzip' length 892378 bytes (871 KB)
  ==================================================
  downloaded 871 KB
  
  * installing *source* package 'knitr' ...
  ** package 'knitr' successfully unpacked and MD5 sums checked
  ** R
  ** demo
  ** inst
  ** byte-compile and prepare package for lazy loading
  Error in loadNamespace(j &lt;- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
    namespace 'xfun' 0.13 is being loaded, but &gt;= 0.21 is required
  ERROR: lazy loading failed for package 'knitr'
  * removing 'C:/Users/lino/Documents/R/win-library/3.5/knitr'
  * restoring previous 'C:/Users/lino/Documents/R/win-library/3.5/knitr'
  
  
  [4/5] Installing tinytex...
  
  In R CMD INSTALL
  
  The downloaded source packages are in
      'C:\Users\lino\AppData\Local\Temp\Rtmpm8AlsN\downloaded_packages'
  Installing package into 'C:/Users/lino/Documents/R/win-library/3.5'
  (as 'lib' is unspecified)
  also installing the dependency 'xfun'
  
  
    There are binary versions available but the source versions are later:
          binary source needs_compilation
  xfun      0.13   0.25              TRUE
  tinytex   0.22   0.33             FALSE
  
    Binaries will be installed
  trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/xfun_0.13.zip'
  Content type 'application/zip' length 184719 bytes (180 KB)
  ==================================================
  downloaded 180 KB
  
  package 'xfun' successfully unpacked and MD5 sums checked
  
  The downloaded binary packages are in
      C:\Users\lino\AppData\Local\Temp\Rtmpm8AlsN\downloaded_packages
  installing the source package 'tinytex'
  
  trying URL 'https://cran.rstudio.com/src/contrib/tinytex_0.33.tar.gz'
  Content type 'application/x-gzip' length 30085 bytes (29 KB)
  ==================================================
  downloaded 29 KB
  
  * 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 &lt;- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
    namespace 'xfun' 0.13 is being loaded, but &gt;= 0.23 is required
  ERROR: lazy loading failed for package 'tinytex'
  * removing 'C:/Users/lino/Documents/R/win-library/3.5/tinytex'
  * restoring previous 'C:/Users/lino/Documents/R/win-library/3.5/tinytex'
  
  
  [5/5] Installing rmarkdown...
  
  In R CMD INSTALL
  
  The downloaded source packages are in
      'C:\Users\lino\AppData\Local\Temp\Rtmpm8AlsN\downloaded_packages'
  Installing package into 'C:/Users/lino/Documents/R/win-library/3.5'
  (as 'lib' is unspecified)
  also installing the dependencies 'knitr', 'tinytex', 'xfun'
  
  trying URL 'https://cran.rstudio.com/src/contrib/knitr_1.33.tar.gz'
  Content type 'application/x-gzip' length 892378 bytes (871 KB)
  ==================================================
  downloaded 871 KB
  
  trying URL 'https://cran.rstudio.com/src/contrib/tinytex_0.33.tar.gz'
  Content type 'application/x-gzip' length 30085 bytes (29 KB)
  ==================================================
  downloaded 29 KB
  
  trying URL 'https://cran.rstudio.com/src/contrib/xfun_0.25.tar.gz'
  Content type 'application/x-gzip' length 112755 bytes (110 KB)
  ==================================================
  downloaded 110 KB
  
  trying URL 'https://cran.rstudio.com/src/contrib/rmarkdown_2.10.tar.gz'
  Content type 'application/x-gzip' length 3248794 bytes (3.1 MB)
  ==================================================
  downloaded 3.1 MB
  
  * installing *source* package 'xfun' ...
  ** package 'xfun' successfully unpacked and MD5 sums checked
  ** libs
  
  *** arch - i386
  Warning in system(cmd) : 'make' not found
  ERROR: compilation failed for package 'xfun'
  * removing 'C:/Users/lino/Documents/R/win-library/3.5/xfun'
  * restoring previous 'C:/Users/lino/Documents/R/win-library/3.5/xfun'
  In R CMD INSTALL
  * installing *source* package 'knitr' ...
  ** package 'knitr' successfully unpacked and MD5 sums checked
  ** R
  ** demo
  ** inst
  ** byte-compile and prepare package for lazy loading
  Error in loadNamespace(j &lt;- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
    namespace 'xfun' 0.13 is being loaded, but &gt;= 0.21 is required
  ERROR: lazy loading failed for package 'knitr'
  * removing 'C:/Users/lino/Documents/R/win-library/3.5/knitr'
  * restoring previous 'C:/Users/lino/Documents/R/win-library/3.5/knitr'
  In R CMD INSTALL
  * 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 &lt;- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
    namespace 'xfun' 0.13 is being loaded, but &gt;= 0.23 is required
  ERROR: lazy loading failed for package 'tinytex'
  * removing 'C:/Users/lino/Documents/R/win-library/3.5/tinytex'
  * restoring previous 'C:/Users/lino/Documents/R/win-library/3.5/tinytex'
  In R CMD INSTALL
  * installing *source* package 'rmarkdown' ...
  ** package 'rmarkdown' 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]]) : 
    there is no package called 'rlang'
  ERROR: lazy loading failed for package 'rmarkdown'
  * removing 'C:/Users/lino/Documents/R/win-library/3.5/rmarkdown'
  * restoring previous 'C:/Users/lino/Documents/R/win-library/3.5/rmarkdown'
  In R CMD INSTALL
  
  The downloaded source packages are in
      'C:\Users\lino\AppData\Local\Temp\Rtmpm8AlsN\downloaded_packages'
  
  
  &lt;U+2714&gt; Packages successfully installed.
  Warning messages:
  1: In utils::install.packages(&quot;knitr&quot;, repos = &quot;https://cran.rstudio.com/&quot;) :
    installation of package 'knitr' had non-zero exit status
  2: In utils::install.packages(&quot;tinytex&quot;, repos = &quot;https://cran.rstudio.com/&quot;) :
    installation of package 'tinytex' had non-zero exit status
  3: In utils::install.packages(&quot;rmarkdown&quot;, repos = &quot;https://cran.rstudio.com/&quot;,  :
    installation of package 'xfun' had non-zero exit status
  4: In utils::install.packages(&quot;rmarkdown&quot;, repos = &quot;https://cran.rstudio.com/&quot;,  :
    installation of package 'knitr' had non-zero exit status
  5: In utils::install.packages(&quot;rmarkdown&quot;, repos = &quot;https://cran.rstudio.com/&quot;,  :
    installation of package 'tinytex' had non-zero exit status
  6: In utils::install.packages(&quot;rmarkdown&quot;, repos = &quot;https://cran.rstudio.com/&quot;,  :
    installation of package 'rmarkdown' had non-zero exit status
  </code></pre>
  <p>I then try again, and proceed with File &gt; New File &gt; R Markdown...</p>
  <p>I once again see this pop-up message:
  <a href="https://i.stack.imgur.com/BmnBm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BmnBm.png" alt="enter image description here" /></a></p>
  <p>This is basically the same as before, except I am no longer told I need to install <code>glue</code>.</p>
  <p>And so I click &quot;Yes&quot;. I then go to open a new R Markdown, and the same pop-up message appears (the second pop-up message I received). This appears to be a cycle that is just not going anyone.</p>
  <p>How can I fix this so that I can start using R Markdown again? I am not sure what went wrong, since I used to be able to use R Markdown fine on this same computer. Apologies if I posted to much of the error messages, I was not sure how much was necessary to properly display the actual issue I should be focusing on. Is there a simple fix to this? I have already tried reinstalling RStudio and it has not helped.</p>